• Fastdfs 部署干货


    tracker server and client:192.168.1.42

    storage server:192.168.1.46

    storage server:192.168.1.53

    安装:

    安装依赖包libfastcommon

    安装fastDFS

    需要关闭iptables、selinux

    yum -y install epel-release

    yum -y install git

    下载地址:

    git clone https://github.com/happyfish100/fastdfs.git

    git clone https://github.com/happyfish100/libfastcommon.git

    git clone https://github.com/happyfish100/fastdfs-nginx-module.git

    tracker server配置:

    [root@localhost ~]# cd libfastcommon-1.0.36
    [root@localhost libfastcommon-1.0.36]# ./make.sh 
    [root@localhost libfastcommon-1.0.36]# ./make.sh install
    [root@localhost libfastcommon-1.0.36]#

    [root@localhost ~]# cd fastdfs-5.0.10
    [root@localhost fastdfs-5.0.10]# ./make.sh 
    [root@localhost fastdfs-5.0.10]# ./make.sh install

    cd /etc/fdfs/
    cp tracker.conf.sample tracker.conf
    vim  tracker.conf
    修改配置文件
    disabled=false        #启用配置文件
    port=22122          #设置tracker的端口号
    base_path=/data/fastdfs/trackerd   #设置tracker的数据文件和日志目录(需预先创建)
    http.server_port=18080     #设置http端口号
     
    cp client.conf.sample  client.conf
    vim client.conf
    base_path=/data/fastdfs/trackerd
    tracker_server=192.168.1.42:22122
     
    启动:
    mkdir -p /data/fastdfs/trackerd
    /usr/bin/fdfs_trackerd /etc/fdfs/tracker.conf restart
    设置开机启动
    echo '/usr/bin/fdfs_trackerd /etc/fdfs/tracker.conf restart' >> /etc/rc.d/rc.local
     
     
    storage server配置:

    [root@localhost ~]# cd libfastcommon-1.0.36
    [root@localhost libfastcommon-1.0.36]# ./make.sh 
    [root@localhost libfastcommon-1.0.36]# ./make.sh install
    [root@localhost libfastcommon-1.0.36]#

    [root@localhost ~]# cd fastdfs-5.0.10
    [root@localhost fastdfs-5.0.10]# ./make.sh 
    [root@localhost fastdfs-5.0.10]# ./make.sh install

    cd /etc/fdfs/
    cp tracker.conf.sample tracker.conf
    vim  tracker.conf
    修改配置文件
    disabled=false        #启用配置文件
    port=23000    
    base_path=/data/fastdfs/storage
    store_path0=/data/fastdfs/storage
    http.server_port=18888     #设置http端口号
    tracker_server=192.168.1.42:22122
     
    启动:
    mkdir -p /data/fastdfs/trackerd
    /usr/bin/fdfs_storaged /etc/fdfs/storage.conf restart
    echo '/usr/bin/fdfs_storaged /etc/fdfs/storage.conf restart' >> /etc/rc.d/rc.local
     
     
    storage server测试连接性:
    /usr/bin/fdfs_monitor /etc/fdfs/storage.conf
     

     tracker server测试上传下载:
     fdfs_upload_file /etc/fdfs/client.conf pom.xml      -----上传
    fdfs_download_file /etc/fdfs/client.conf          -----下载

    增加nginx upstream:

    yum -y install epel-release

    yum -y install nginx

    位于http{}

     very good,晚上吃点好的去,啦啦啦啦!!!
     
     
  • 相关阅读:
    java工程文件路径的问题
    to_char
    tnsname.ora
    Linux(Centos)快速搭建SVN
    /etc/profile不生效问题
    不同servlet版本的web.xml的头部信息
    The serializable class XXX does not declare a static final serialVersionUID field of type long的警告
    面试:第六章:面试题收集
    面试:第一章:java基础各种区别
    面试:第二章:各种框架和中间件以及缓存数据库
  • 原文地址:https://www.cnblogs.com/alex-note/p/6957444.html
Copyright © 2020-2023  润新知