• fastdfs 服务安装与配置


    下载libfastcommon:
    cd
    wget https://github.com/happyfish100/libfastcommon/archive/V1.0.35.tar.gz
    tar -xavf V1.0.35.tar.gz
    cd libfastcommon-1.0.35/
    ./make.sh
    ./make.sh install




    安装fastdfs 5.10:
    cd
    wget https://github.com/happyfish100/fastdfs/archive/V5.10.tar.gz
    tar -xzvf V5.10.tar.gz
    cd fastdfs-5.10/
    ./make.sh
    ./make.sh install
    cd ~/fastdfs-5.10/conf
    cp http.conf anti-steal.jpg mime.types /etc/fdfs/




    创建目录:
    mkdir -p /var/lib/fast-dfs/tracker
    mkdir -p /var/lib/fast-dfs/storage/{base,path0}
    mkdir -p /var/lib/fast-dfs/client
    mkdir -p /var/lib/fast-dfs/nginx-module




    创建配置文件:
    cp -p /etc/fdfs/tracker.conf.sample /etc/fdfs/tracker.conf
    cp -p /etc/fdfs/storage.conf.sample /etc/fdfs/storage.conf
    cp -p /etc/fdfs/client.conf.sample /etc/fdfs/client.conf




    修改tracker进程的配置文件/etc/fdfs/tracker.conf:
    --------------------------------------------------------
    将:
    base_path=/home/yuqing/fastdfs
    改为:
    base_path=/var/lib/fast-dfs/tracker
    --------------------------------------------------------




    修改storage进程的配置文件/etc/fdfs/storage.conf:
    --------------------------------------------------------
    将:
    base_path=/home/yuqing/fastdfs
    改为:
    base_path=/var/lib/fast-dfs/storage/base
    --------------------------------------------------------
    将:
    store_path0=/home/yuqing/fastdfs
    改为:
    store_path0=/var/lib/fast-dfs/storage/path0
    --------------------------------------------------------
    将:
    tracker_server=192.168.209.121:22122
    改为:
    tracker_server=vs73:22122
    --------------------------------------------------------




    修改client进程的配置文件/etc/fdfs/client.conf:
    --------------------------------------------------------
    将:
    base_path=/home/yuqing/fastdfs
    改为:
    base_path=/var/lib/fast-dfs/client
    --------------------------------------------------------
    将:
    tracker_server=192.168.0.197:22122
    改为:
    tracker_server=vs73:22122
    --------------------------------------------------------




    启动tracker进程:
    fdfs_trackerd /etc/fdfs/tracker.conf start
    fdfs_trackerd /etc/fdfs/tracker.conf stop
    或者
    systemctl enable fdfs_trackerd
    systemctl stop fdfs_trackerd
    systemctl start fdfs_trackerd
    systemctl status fdfs_trackerd


    启动storage进程:
    fdfs_storaged /etc/fdfs/storage.conf start
    fdfs_storaged /etc/fdfs/storage.conf stop
    或者
    systemctl enable fdfs_storaged
    systemctl stop fdfs_storaged
    systemctl start fdfs_storaged
    systemctl status fdfs_storaged




    测试
    fdfs_monitor /etc/fdfs/storage.conf
    fdfs_upload_file /etc/fdfs/client.conf local_filename
    fdfs_download_file /etc/fdfs/client.conf remote_filename
    fdfs_file_info /etc/fdfs/client.conf remote_filename

  • 相关阅读:
    写在vue总结之前(一)
    前端应该掌握的web基础和网络知识
    sass之为什么要使用预处理器
    ThinkPHP简单的验证码实现
    ajax接收php返回得到一堆html代码
    Bootstrap 4,“未捕获错误:Bootstrap工具提示需要Tether(http://github.hubspot.com/tether/)”
    百度AI开放平台- API实战调用
    最短路径算法—Dijkstra(迪杰斯特拉)算法分析与实现(C/C++)
    C#避免踩坑之如何添加paint事件
    php插入mysql中文数据出现乱码
  • 原文地址:https://www.cnblogs.com/PMlog/p/7067955.html
Copyright © 2020-2023  润新知