zoukankan      html  css  js  c++  java
  • FastDfs点滴

    1、centos安装后提示找不到libevent动态库

      根据系统是64位版本还是32位版本,若是64位版本则默认回到 /usr/lib64 目录下查找,而对于32位则到 /usr/lib 目录下查找。因此当提示找不到动态库时,由于安装libevent时默认安装到 /usr/local/lib 目录下,因此需要执行如下软连接:

      64位:ln -s /usr/local/lib/libevent-2.0.so.5 /usr/lib64/libevent-2.0.so.5

      32位:ln -s /usr/local/lib/libevent-2.0.so.5 /usr/lib/libevent-2.0.so.5

    2、安装Nginx模块

      模块下载地址:http://code.google.com/p/fastdfs/downloads/detail?name=fastdfs-nginx-module_v1.15.tar.gz

      给nginx添加fastdfs模块(若nginx已存在,需要重新编译):

        1)将fastdfs-nginx-module_v1.15.tar.gz解压到一个目录,如:/root/soft/fastdfs/fastdfs-nginx-module

        2)修改 /root/soft/fastdfs/fastdfs-nginx-module/src/mod_fastdfs.conf 配置文件

          注意: url_have_group_name = false 配置,默认为false,若为true则在访问的时候需要增加group前缀      

    # if the url / uri including the group name
    # set to false when uri like /M00/00/00/xxx
    # set to true when uri like ${group_name}/M00/00/00/xxx, such as group1/M00/xxx
    # default value is false
    url_have_group_name = false

        3)重新编译nginx:

          ./configure --prefix=/usr/local/nginx --add-module=/root/soft/fastdfs/fastdfs-nginx-module/src

          make & sudo make install 

        4)启动nginx

        5)验证

          1)使用fdfs_test upload 一个文件,fdfs_test client.conf upload a.html 得到remote_filename=M00/00/01/CgAHl1JuKkKAKvhvAAAAEbptGHo73.html

          2)通过http请求下载这个文件 http://10.0.7.151/M00/00/01/CgAHl1JuKkKAKvhvAAAAEbptGHo73.html

          3)下载到文件表示成功

        6)参考网页:http://lection-yu.iteye.com/blog/1536870    

  • 相关阅读:
    输出三角行
    练习
    循环
    阶乘
    常量、变量、数据类型 搞错N+1次 累死
    UTF-8
    数据库事务
    Jsp的使用
    Cookie和Session
    请求转发和重定向
  • 原文地址:https://www.cnblogs.com/chang290/p/3363900.html
Copyright © 2011-2022 走看看