1、安装fastdfs镜像
docker pull morunchang/fastdfs ###运行tracker docker run -d --name tracker --net=host morunchang/fastdfs sh tracker.sh ###运行storage docker run -d --name storage --net=host -e TRACKER_IP=10.168.31.168:22122 -e GROUP_NAME=storagegroup morunchang/fastdfs sh storage.sh ###开放端口 firewall-cmd --zone=public --add-port=22122/tcp --permanent firewall-cmd --reload ###测试一下
2需要两个项目git地址:
https://github.com/happyfish100/fastdfs-client-java 下载后、打包放入本地maven仓库
https://github.com/ityouknow/spring-boot-examples.git中的spring-boot-fastDFS这个项目
修改spring-boot-fastDFS的fdfs_client.conf配置文件tracker_server = 192.168.1.62:22122
3、启动springboot,访问http://localhost:8080/