• Centos7.6 FastDFS安装部署


    Centos7.6 FastDFS安装部署

     

    单价节点部署

    1.1 准备环境

    1) 操作系统

    Centos7.6操作系统,关闭selinux,防火墙开机80,22122,23000端口的访问;

    firewall-cmd --zone=public --add-port=80/tcp –permanent

    firewall-cmd --zone=public --add-port=22122/tcp –permanent

    firewall-cmd --zone=public --add-port=23000/tcp –permanent

    firewall-cmd --reload

    2) 安装软件

    安装vim

    yum install vim net-tools wget -y

    安装gcc

    yum install -y gcc gcc-c++

    3) 创建fastdfs存储路径

    mkdir -p /data/fastdfs

    cd /data/fastdfs/

    mkdir fdfs_client  storage  tracker

    1.2 安装 libfastcommon

    tar -xf libfastcommon.tar.gz

    cd libfastcommon

    ./make.sh && ./make.sh install

    rm -f /usr/local/lib/libfastcommon.so
    rm -f /usr/local/lib/libfdfsclient.so
    rm -f /usr/lib/libfastcommon.so
    rm -f /usr/lib/libfdfsclient.so

    ln -s /usr/lib64/libfastcommon.so /usr/local/lib/libfastcommon.so

    ln -s /usr/lib64/libfastcommon.so /usr/lib/libfastcommon.so

    1.3 安装 tracker

    tar -xf FastDFS_v5.08.tar.gz

    cd FastDFS

    vim make.sh

    TARGET_PREFIX=$DESTDIR/usr 改成 TARGET_PREFIX=$DESTDIR/usr/local

    TARGET_PREFIX=$DESTDIR/usr/local

    ./make.sh && ./make.sh install

     

    ln -s /usr/local/lib64/libfdfsclient.so /usr/lib/libfdfsclient.so

    ln -s /usr/local/lib64/libfdfsclient.so /usr/local/lib/libfdfsclient.so

     

    cp conf/* /etc/fdfs/

    1.4 配置和启动 tracker

    vim /etc/fdfs/tracker.conf

    /usr/local/bin/fdfs_trackerd /etc/fdfs/tracker.conf start

    1.5 配置和启动 storage

    vim /etc/fdfs/storage.conf

    base_path=/data/fastdfs/storage

    store_path0=/data/fastdfs/storage

    tracker_server=172.16.36.204:22122

     

    启动

    /usr/local/bin/fdfs_storaged /etc/fdfs/storage.conf start

    启动成功后,在/data 目录下生成以下显示目录

    1.6 测试FastDFS上传文件

    vim /etc/fdfs/client.conf

    base_path=/data/fastdfs/fdfs_client

    tracker_server=172.16.36.203:22122

    1.7 FastDFS Nginx整合

    1.8 Nginx 的安装

  • 相关阅读:
    redis redis-cli 操作指令
    Apache 配置默认编码
    Apache 查找httpd.conf文件
    Apache 错误日志
    dataTable 自定义排序
    bootstrap select2 参数详解
    获取元素滚动条高度
    TP5 操作DB is null is not null 条件
    TP5 自带分页类的传参
    jquery 获取 file 表单 上传的文件名
  • 原文地址:https://www.cnblogs.com/AnKangwenqiang/p/16164222.html
Copyright © 2020-2023  润新知