zoukankan      html  css  js  c++  java
  • 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=192.168.211.132:22122 -e GROUP_NAME=group1 morunchang/fastdfs sh storage.sh
    使用的网络模式是–net
    =host, 192.168.211.132是宿主机的IP group1是组名,即storage的组 如果想要增加新的storage服务器,再次运行该命令,注意更换 新组名



    1.2.2 配置Nginx
    
    Nginx在这里主要提供对FastDFS图片访问的支持,Docker容器中已经集成了Nginx,我们需要修改nginx的配置,进入storage的容器内部,修改nginx.conf
    
    docker exec -it storage  /bin/bash
    
    vi /etc/nginx/conf/nginx.conf
    
    添加以下内容
    
    location ~ /M00 {
         root /data/fast_data/data;
         ngx_fastdfs_module;
    }
    
    
    add_header Cache-Control no-store;
    
    
    退出容器
    
    exit
    重启storage容器
    
    docker restart storage

     

    开启启动设置
    
    docker update --restart=always tracker
    docker update --restart=always storage
  • 相关阅读:
    bzoj [POI2015]Myjnie
    bzoj2217 [Poi2011]Lollipop
    Codeforces A Mist of Florescence
    bzoj4380 [POI2015]Myjnie
    bzoj4292 [PA2015]Równanie
    bzoj 3517翻硬币
    模块补充
    python解释器
    __file__、__name__、__dict__方法整理
    软件开发规范
  • 原文地址:https://www.cnblogs.com/angdh/p/15649434.html
Copyright © 2011-2022 走看看