Fastdfs搭建参考:https://www.cnblogs.com/minseo/p/10210428.html(https://www.cnblogs.com/minseo/p/10210428.html

  把fastdfs从5.0.5版本升级为5.0.11

  环境查看

Fastdfs5.05升级至5.11_重启

 

   升级前版本

Fastdfs5.05升级至5.11_nginx_02

 

   下载软件

wget https://codeload.github.com/happyfish100/libfastcommon/tar.gz/V1.0.35
wget https://codeload.github.com/happyfish100/fastdfs/tar.gz/V5.11

   PS:原5.0.5使用libfastcomon1.0.7包需要下载新包

  安装

  分别在tracker和storage主机安装

  安装libfastcommon

tar -xf libfastcommon-1.0.35.tar.gz 
cd libfastcommon-1.0.35
./make.sh 
./make.sh install

   安装fastfs5.11

tar -xf fastdfs-5.11.tar.gz
cd fastdfs-5.11/
./make.sh
./make.sh install

   删除原旧的软连接并创建新软连接

#删除原软连接
rm -rf /usr/local/bin/fdfs_trackerd 
rm -rf /usr/local/bin/fdfs_storaged 
rm -rf /usr/local/bin/stop.sh 
rm -rf /usr/local/bin/restart.sh 
#创建新软连接
ln -s /usr/bin/fdfs_trackerd /usr/local/bin/
ln -s /usr/bin/fdfs_storaged /usr/local/bin/
ln -s /usr/bin/stop.sh /usr/local/bin/
ln -s /usr/bin/restart.sh /usr/local/bin/

   重启tracker

systemctl daemon-reload
systemctl restart fdfs_trackerd

   重启storage

 systemctl restart fdfs_storaged

   查看版本是否升级为5.11

fdfs_test

 

Fastdfs5.05升级至5.11_fish_03

 

 

  查看storage和tracker通信

fdfs_monitor /etc/fdfs/storage.conf

   重启nginx

/usr/local/nginx/sbin/nginx -s stop
/usr/local/nginx/sbin/nginx

   注意:nginx需要停止以后再启动不能reload否则访问会出现404,原因未知

  上传及访问测试

fdfs_upload_file /etc/fdfs/client.conf /etc/hosts
group1/M00/00/00/rBAU5F7Ul-eAZbUNAAAAtFkJcek4614861
[root@test-storage nginx]# curl 127.0.0.1/group1/M00/00/00/rBAU5F7Ul-eAZbUNAAAAtFkJcek4614861
127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6
192.168.1.228 storage