Docker安装FastDFS

·  阅读 495
Docker安装FastDFS
    1. docker pull season/fastdfs
    1. systemctl stop firewalld
    1. vi /etc/sysconfig/selinux
    1. 将SELINUX的值改成disabled
    1. 重启reboot
    1. 创建tracker容器: docker run -ti -d --name trakcer -v ~/tracker_data:/fastdfs/tracker/data --net=host season/fastdfs tracker
    1. 创建storage容器: docker run -tid --name storage -v ~/storage_data:/fastdfs/storage/data -v ~/store_path:/fastdfs/store_path --net=host -e TRACKER_SERVER:10.0.40.61:22122 -e GROUP_NAME=group1 season/fastdfs storage
    1. 拷贝出文件进行修改: docker cp storage:/fdfs_conf/storage.conf ~/
    1. 编辑文件将tracker_server后的ip改成自己的服务器ip
    1. 将修改后的文件重新复制回容器中: docker cp ~/storage.conf storage:/fdfs_conf/
    1. 重新启动storage容器: docker stop storage / docker start storage
分类:
后端
标签:
分类:
后端
标签: