Build a file server on ubuntu

First, you need to download the file resources on ubuntu. There are three resources in total. It is recommended to install git and nginx before downloading the resources, which will be used in this tutorial.

(Ngnix: http://nginx.org/download/nginx-1.12.2.tar.gz, use winscp to upload the compressed file, and then use the tar password to decompress nginx: tar -zxvf /home/ubuntu/source/nginx-1.12. 2.tar.gz)

libfastcommon

https://github.com/happyfish100/libfastcommon/tree/V1.0.36

fastdfs

https://github.com/happyfish100/fastdfs/tree/V5.11

fastdfs-nginx-module

https://github.com/happyfish100/fastdfs-nginx-module

After downloading, we started to build.

Compile and install libfastcommon

. /make.sh

. /make.sh install

ln -s /usr/lib64/libfastcommon.so /usr/local/lib/libfastcommon.so

Compile and install fastdfs

. /make.sh

. /make.sh install

Configure tracker.conf

cp /etc/fdfs/tracker.conf.sample /etc/fdfs/tracker.conf

vi /etc/fdfs/tracker.conf

Modified content:

base_path=/home/fastdfs

Configure storage.conf

cp /etc/fdfs/storage.conf.sample /etc/fdfs/storage.conf

vi /etc/fdfs/storage.conf

Modified content:

base_path=/home/fastdfs

tracker_server=10.0.2.15:22122

store_path0=/home/fastdfs

Configure http.conf mime.types

cp fastdfs-5.11/conf/http.conf /etc/fdfs/

cp fastdfs-5.11/conf/mime.types /etc/fdfs/

Configure client.conf

cp /etc/fdfs/client.conf.sample /etc/fdfs/client.conf

vi /etc/fdfs/client.conf

Modified content:

base_path=/home/fastdfs

tracker_server=10.0.2.15:22122

include http.conf #Open this line of code is commented out by default

Start tracker

/etc/init.d/fdfs_trackerd start

Other commands:

/etc/init.d/fdfs_trackerd stop #stop

/etc/init.d/fdfs_trackerd restart #restart

Start storage

/etc/init.d/fdfs_storaged start

Other commands:

/etc/init.d/fdfs_storaged stop #Stop

/etc/init.d/fdfs_storaged restart #restart

Test the installation of fastdfs

fdfs_test /etc/fdfs/client.conf upload /home/0.gif

As shown in the figure, the address for uploading pictures is generated.

Recommended Posts

Build a file server on ubuntu
Build Nginx-RTMP live server on ubuntu
How to build an NFS file sharing server on Ubuntu 16.04
Build a LAMP development environment on Ubuntu 16.04
Build a Minecraft Bedrock Edition server (Ubuntu)
[Linux] Build Samba server (ubuntu16.04)
Install OpenSSL 1.0.2 on Ubuntu Server 14.04
Configure tomcat on ubuntu server
Build Ubuntu 12.04 cross compilation server
Ubuntu16.04 build GitLab server tutorial
How to set up a DNS server on Ubuntu 18.04
Install Chef server workstation on Ubuntu 18.04
Ubuntu16.04 build php5.6 Web server environment
Build Discuz forum based on ubuntu
Install Oracle 11gR2 on Ubuntu Server 12.4.0
Build an Ubuntu Linux development environment on a Vmware virtual machine
Install Gnome and VNC on Ubuntu Server
How to build nfs service on ubuntu16.04
How to install Bacula Server on Ubuntu 14.04
CentOS7 build FastDFS distributed file system (on)
WordPress-Build a personal blog based on Ubuntu 16.04
How to use Samba server on Ubuntu 16.04
Configure Nginx Git server on Ubuntu system
A little experience using mysql on Ubuntu
Build a python development environment under Ubuntu
How to install Zabbix on Ubuntu 16.04 Server
lamp on ubuntu
Ubuntu build etcd
Ubuntu build Seafile
How to set static IP on Ubuntu 18.04 Server
How to set static IP on Ubuntu 18.04 Server
How to quickly deploy docker on ubuntu server
Centos7 tutorial to build a master-slave DNS server
Configure Wolfram Engine on Tencent Cloud ubuntu server
How to use Jenkins to build automatically on Ubuntu
How to build a LAMP environment on centos7.2
How to run the parsing server on Ubuntu 14.04
Install Leanote on Ubuntu18 to build cloud notes
install vscode on ubuntu18
Install Redis on Ubuntu
Build k8s1.9.9 on centos7
Install R4 on ubuntu20
Install postgresql-10 on Ubuntu 18.04
3 minutes to teach you to build gitea on Centos server
Install docker on Ubuntu
Install Docker on ubuntu18.04
Install nodejs10 on Ubuntu16
Ubuntu 18.04 LTS LAMP build
How to start a blog with Hexo on Ubuntu 14.04
Install mysql on Ubuntu 14.04
A simple tutorial to install Sogou Pinyin on ubuntu18.04
Install Django on ubuntu
CentOS uses Nginx to build a download function server
Install Python3 on Ubuntu 14.04
How to configure a fixed IP based on Ubuntu 18.04
Centos8 implementation steps to build a local web server
Jenkins build on centos
File transfer method between Windows and Ubuntu on VMware
Install JDK10+ on Ubuntu
Install Python3 on Ubuntu 16.04
ROS learning---Install ROS on Ubuntu