fastdfs学习笔记之安装

来源:互联网 发布:汽车obd 模拟软件 编辑:程序博客网 时间:2024/05/19 08:24
  1. 到 https://sourceforge.net/projects/fastdfs/ 或 https://github.com/happyfish100/fastdfs 下载源码
  2. 需要先安装 libfastcommon https://github.com/happyfish100/libfastcommon
  3. 按照 INSTALL的说明安装
  4. 修改 /etc/fdfs下的配置文件
    • tracker.conf
      修改 base_path
    • storage.conf
      修改 base_path, store_path0, tracker_server
    • client.conf
      base_path, tracker_server
  5. 启动
    /usr/bin/fdfs_trackerd /etc/fdfs/tracker.conf restart
    /usr/bin/fdfs_storaged /etc/fdfs/storage.conf restart
  6. 上传文件
    /usr/bin/fdfs_test /etc/fdfs/client.conf upload /home/tom/aaa.txt

http访问

需要安装 nginx和fastdfs-nginx-module
1. 安装 nginx时报错:
/mydev/fastdfs-nginx-module/src/common.c:21:25: 致命错误:fdfs_define.h:没有那个文件或目录
解决:
修改 fastdfs-nginx-module/src/config中的
$CORE_INCS /usr/local/include/fastdfs /usr/local/include/fastcommon

$CORE_INCS /usr/include/fastdfs /usr/include/fastcommon
2. 按INSTALL安装 fastdfs-nginx-module
3. nginx启动报错:
找不到 /etc/fdfs/mod_fastdfs.conf
解决:
复制 /fastdfs-nginx-module/src/mod_fastdfs.conf 到 /etc/fdfs
4. 访问 http://xxx.xxx.xxx.xxx/M00/00/00/wKi6A1ZkTqmAKHXxAAAADEVYxUM214_big.txt

0 0
原创粉丝点击