安装Fastdfs(linux)

1. 部署fastdfs

fastdfs部署官网:https://github.com/happyfish100/fastdfs/wiki

2. 配置Fastdfs

1.修改client.conf

  • vi /etc/fdfs/client.conf -> 把ip修改为当前虚拟机ip

2.修改storage.conf

  • vi /etc/fdfs/storage.conf -> 把ip修改为当前虚拟机ip

3.启动fastdfs

  • service fdfs_trackerd start
  • service fdfs_storaged start

4.查看是否启动成功

  • netstat -unltp|grep fdfs

5.查看监控信息

  • /usr/bin/fdfs_monitor /etc/fdfs/storage.conf

6.启动Nginx

  • /usr/local/nginx/sbin/nginx -c /usr/local/nginx/conf/nginx.conf

7.关闭防火墙

  • service iptables stop

8.测试Nginx

  • 在虚拟机里面: curl http://虚拟机ip:80
    在这里插入图片描述

  • 在宿主机测试:浏览器访问 http://虚拟机ip:80
    在这里插入图片描述

9.测试上传

  • fdfs_test /etc/fdfs/client.conf upload /root/1.gif(通过xftp上传到/root下一张图片)

在这里插入图片描述

10.效果展示

在这里插入图片描述

发布了33 篇原创文章 · 获赞 0 · 访问量 388

猜你喜欢

转载自blog.csdn.net/weixin_45737653/article/details/105131569