download libfastcommon
Download address: https://github.com/happyfish100/libfastcommon/archive/V1.0.7.tar.gz
Unzip libfastcommon
tar -zxvf V1.0.7.tar.gz
compile
cd libfastcommon-1.0.7 ./make.sh
Install
./make.sh install
download fastDFS
Download address: https://github.com/happyfish100/fastdfs/archive/V5.05.tar.gz
decompress
tar -zxvf V5.05.tar.gz
compile
cd fastfds-5.05 ./make.sh
Install
./make.sh install
Configure the tracker service
cd / etc / fdfs cp tracker.conf.sample tracker.conf vim tracker.conf
Modify the following bast_path, the directory confirms that it has been created
# the base path to store data and log files base_path=/data/fastdfs
Start the tracer service
/usr/bin/fdfs_trackerd /etc/fdfs/tracker.conf start
But the above command is a bit cumbersome, so someone on the Internet gave an alternative
#create soft link 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 #start up service fdfs_trackerd start
View listening
netstat -unltp | grep fdfs
Configure storage service
cp storage.conf.sample storage.conf vim storage.conf
Find the following parameters and modify them
base_path=/data/fastdfs/storage store_path0=/data/fastdfs/storage tracker_server=192.168.92.128:22122
Note: There is a pit here. I tested the tracker and storage locally on the same machine, so I set the IP to 127.0.0.1, which resulted in an error when the subsequent service was started! ! !
start up
ln -s /usr/bin/fdfs_storaged /usr/local/bin service fdfs_storaged start
View listening
netstat -unltp | grep fdfs
View health
If you encounter problems during the above installation process, you can view the log
tracker log: /data/fastdfs/logs/trackerd.log
storage log: /data/fastdfs/storage/logs/storaged.log
test upload
OK!