contos install and configure fastdfs 5.0.8

1. unzip libfastcommon-master.zip

Two, ./make.shsum./make.sh install

If you can't compile, you need to install gcc

yum -y install gcc-c++

三、tar -zxvf fastdfs-5.08.tar.gz

./Make.sh

./make.sh install
5. After the compilation is completed, the configuration will be generated in this folder: cd /etc/fdfs
6. Get the configuration file
cp client.conf.sample client.conf
cp storage.conf.sample storage.conf
cp tracker.conf.sample tracker.conf
7. Edit tracker.conf
disabled=false #Enable configuration file (enabled by default)
port=22122 #Set the port number of the tracker, usually the default port of 22122 is used
base_path=/opt/fastdfs_tracker #Set the data file and log directory of the tracker
http.server_port=6666 #Set the http port number, the default is 8080
Eight, mkdir -p /opt/fastdfs_tracker
Nine, start: service fdfs_trackerd start
10. Edit vi /etc/fdfs/storage.conf
disabled=false #Enable configuration file (enabled by default)
group_name=group1 #Group name, modify it according to the actual situation
port=23000 #Set the port number of storage, the default is 23000, the storage port number of the same group must be the same
base_path=/opt/fastdfs_storage #Set storage data files and log directories
store_path_count=1 #Number of storage paths, which needs to match the number of store_paths
store_path0=/opt/fastdfs_storage_data #Actual file storage path
tracker_server=192.168.111.11:22122 #tracker server IP address and port number, if it is a stand-alone setup, do not write 127.0.0.1 for the IP, otherwise the startup will fail (the ip here is my CentOS virtual machine ip)
http.server_port=8888 #Set the http port number
Eleven, increase the directory
mkdir /opt/fastdfs_storage
mkdir /opt/fastdfs_storage_data
12. Start:
service fdfs_storaged start
 Thirteen, establish software links
ln -s /usr/bin/fdfs_trackerd /usr/local/bin
ln -s /usr/bin/stop.sh /usr/local/bin
ln -s /usr/bin/restart.sh /usr/local/bin
ln -s /usr/bin/fdfs_storaged /usr/local/bin
fourteen; monitoring
/ usr / bin / fdfs_monitor /etc/fdfs/storage.conf
Fifteen: Add boot start:

Add boot, open /etc/rc.d/rc.local

 vi /etc/rc.d/rc.local

and append the following configuration to the file:

service fdfs_storaged start

After confirming that the tracker starts normally, you can set the tracker to start at boot, open /etc/rc.d/rc.local and add the following configuration to it:

service fdfs_trackerd start

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326421304&siteId=291194637