• Linux(centos)系统下安装fastdfs安装部署步骤


    试验环境,所以打算把跟踪器和存储器安装到同一台实例上

    1、准备安装包上传到/usr/local/fastdfs

    FastDFS_v5.05.tar.gz (FastDFS安装包)

    libfastcommonV1.0.7.tar.gz (FastDFS依赖程序)

    nginx-1.8.0.tar.gz (nginx安装包,用于做文件请求http代理服务器)

    fastdfs-nginx-module_v1.16.tar.gz (nginx和fastdfs的桥梁插件模块)

    安装包路径:

    链接:https://pan.baidu.com/s/1sR1FbaFOg0WJ2GejsaqZBw
    提取码:4dxf

    2、安装C/C++ 编译环境

    yum -y install gcc gcc-c++

    yum -y install libevent

    3、安装 libfastcommon

    cd /usr/local/fastdfs
    tar -zxf libfastcommonV1.0.7.tar.gz
    cd libfastcommon-1.0.7
    ./make.sh
    ./make.sh install
    cp /usr/lib64/libfastcommon.so /usr/lib

    4、安装FastDFS

    cd /usr/local/fastdfs

    tar -zxf FastDFS_v5.05.tar.gz

    cd FastDFS

    ./make.sh

    ./make.sh install

    cd conf

    cp * /etc/fdfs

    5、编辑/etc/fdfs/tracker.conf

    vi /etc/fdfs/tracker.conf
    base_path=/usr/local/fastdfs/FastDFS/tracker

    6、启动tracker

      /usr/bin/fdfs_trackerd /etc/fdfs/tracler.conf  

    7、配置storage节点

    vi /etc/fdfs/storage.conf

    base_path=/usr/local/fastdfs/FastDFS/storage

    store_path0=/usr/local/fastdfs/FastDFS/storage

    tracker_server = 192.168.0.107:22122

    8、启动storage节点

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

    9、配置测试

    cd /usr/local/fastdfs//FastDFS/client/

    cp libfastclient.so /usr/lib

    10、修改测试配置文件

    vi /etc/fdfs/client.conf

    base_path=/usr/local/fastdfs/FastDFS/client

    tracker_server=192.168.0.107:22122

    11、测试上传

    vim /root/hi.html

    /usr/bin/fdfs_test /etc/fdfs/client.conf upload /root/hi.html

    12、安装nginx

    yum install -y gcc-c++   (已安装)

    yum install -y pcre pcre-devel

    yum install -y zlib zlib-devel

    yum install -y openssl openssl-devel

    13、解压fastdfs-nginx-module_v1.16.tar.gz

    cd /usr/local/fastdfs/

    tar -zxf fastdfs-nginx-module_v1.16.tar.gz

    14、修改fastdfs-nginx-module/src/config配置文件

    ​ 把CORE_INCS="$CORE_INCS /usr/local/include/fastdfs /usr/include/fastcommon/"

    ​ 修改为:CORE_INCS="$CORE_INCS /usr/include/fastdfs /usr/include/fastcommon/"

    ​ 把CORE_LIBS="$CORE_LIBS -L/usr/local/lib -lfastcommon -lfdfsclient"

    ​ 修改为:CORE_LIBS="$CORE_LIBS -L/usr/lib -lfastcommon -lfdfsclient"

    实际就是把路径中的local这一层删除掉

    15、复制fastdfs-nginx-module/src/mod_fastdfs.conf 到/etc/fdfs目录下

    并编辑

    cp mod_fastdfs.conf /etc/fdfs/

    tracker_server=192.168.0.107:22122

    url_have_group_name = true

    storage_server_port=23000

    group_name=group1

    store_path0=/usr/local/fastdfs/FastDFS/storage

    16、安装nginx

    cd /usr/local/fastdfs

    tar -zxf nginx-1.8.0.tar.gz

    cd nginx-1.8.0
    ./configure --add-module=/usr/local/fastdfs/fastdfs-nginx-module/src

    make

    make install

    17、配置nginx

    cd /usr/local/nginx/conf​

    vim nginx.conf

    server{
    listen 80;
    server_name localhost;
    location /group1/M00/{
    ngx_fastdfs_module;
    }
    }

    18、重启nginx

    /usr/local/nginx/sbin/nginx

  • 相关阅读:
    oracle nvl,to_char 函数(二)
    GridView的使用技巧
    asp.net应用程序性能的提高方案
    浅谈 ViewState
    最为关心的问题,hbase查询一条数据的过程.
    HBase的弊端。
    拙建:(mapreduce 如何来分步统计词频)
    终于找到hbase分布式存储数据的方式.
    迷局一般的openjdk6jdk!
    IT事业不好走,大家在虚拟的世界,记得回到真实的世界,不然你将会成为下一个张孝祥.
  • 原文地址:https://www.cnblogs.com/qiaolizhi/p/12461901.html
Copyright © 2020-2023  润新知