zoukankan      html  css  js  c++  java
  • fastdfs知识点

    一、fastdfs搭建

    1、gcc
        1、yum install make cmake gcc gcc-c++
    2、libfastcommon-master
        1、cd /opt/
        2、mkdir -p fastdfs
        3、cd fastdfs/
        4、wget https://github.com/happyfish100/libfastcommon/archive/V1.0.43.tar.gz
        5、mv V1.0.43.tar.gz libfastcommon-1.0.43.tar.gz
        6、tar -zxvf libfastcommon-1.0.43.tar.gz
        7、cd libfastcommon-1.0.43
        8、./make.sh && ./make.sh install
    3、fastdfs
        1、cd ..
        2、wget https://github.com/happyfish100/fastdfs/archive/V6.06.tar.gz
        3、mv V6.06.tar.gz fastdfs-6.06.tar.gz
        4、tar -zxvf fastdfs-6.06.tar.gz
        5、cd fastdfs-6.06
        6、./make.sh && ./make.sh install
    4、tracker配置
        1、cd /etc/fdfs/
        2、cp tracker.conf.sample tracker.conf
        3、mkdir -p /fastdfs/tracker
        4、配置tracker.conf:base_path = /fastdfs/tracker
        5、/etc/init.d/fdfs_trackerd start(stop停止)
    5、storage配置
        1、cd /etc/fdfs/
        2、cp storage.conf.sample storage.conf
        3、mkdir -p /fastdfs/storage
        4、配置storage.conf:
            base_path = /fastdfs/storage
            store_path0 = /fastdfs/storage
            tracker_server = 172.21.25.10:22122
            http.server_port = 8888
        5、/etc/init.d/fdfs_storaged start(stop停止)
    6、fastdfs-nginx-module
        1、cd /opt/fastdfs/
        2、wget https://github.com/happyfish100/fastdfs-nginx-module/archive/V1.22.tar.gz
        3、mv V1.22.tar.gz fastdfs-nginx-module-1.22.tar.gz
        4、tar -zxvf fastdfs-nginx-module-1.22.tar.gz
        5、cd fastdfs-nginx-module-1.22/src/
        6、配置config:
            ngx_module_incs="/usr/include"
            CORE_INCS="$CORE_INCS /usr/include"
    7、nginx
        1、yum -y install pcre pcre-devel zlib zlib-devel
        2、cd /opt/fastdfs/
        3、wget http://nginx.org/download/nginx-1.19.2.tar.gz
        4、tar -zxvf nginx-1.19.2.tar.gz
        5、cd nginx-1.19.2
        6、./configure --prefix=/usr/local/webserver/nginx --with-http_stub_status_module --with-http_ssl_module --add-module=/opt/fastdfs/fastdfs-nginx-module-1.22/src/
        7、make && make install
        8、cd /etc/fdfs/
        9、cp /opt/fastdfs/fastdfs-nginx-module-1.22/src/mod_fastdfs.conf /etc/fdfs/
        10、配置mod_fastdfs.conf:
            connect_timeout=10
            tracker_server=172.21.25.10:22122
            url_have_group_name = true
            store_path0=/fastdfs/storage
        11、cd /opt/fastdfs/fastdfs-6.06/conf/
        12、cp http.conf mime.types /etc/fdfs/
        13、ln -s /fastdfs/storage/data/ /fastdfs/storage/data/M00
        14、cd /usr/local/webserver/nginx/conf/
        15、配置nginx.conf:
            server {
                location ~/group([0-9])/M00 {
                    root  /fastdfs/storage/data;
                    ngx_fastdfs_module;
                }
            }
        16、/usr/local/webserver/nginx/sbin/nginx
    9、浏览器测试
        1、ip/文件id
  • 相关阅读:
    在Magento中添加一个自己的支付模块----第一部分
    留言互相关注哟
    【Java】final修饰符的使用
    【java】关于Cannot refer to the non-final local variable list defined in an enclosing scope解决方法
    【Java】遍历List/Set/Map集合的一些常用方法
    Java Socket编程,小案例(有注释)
    xml解析
    阿九说:Dom4j解析XML
    神秘的Java注解
    反射是框架设计的灵魂
  • 原文地址:https://www.cnblogs.com/linding/p/13731224.html
Copyright © 2011-2022 走看看