FastDFS安装和基本命令
首先说下fastdfs 依赖的应用,网上各种资源下载需要积分,其实github基本都有。下面提供一些可用版本链接。
1. 下载libevent
wget https://github.com/libevent/libevent/releases/download/release-2.1.8-stable/libevent-2.1.8-stable.tar.gz
解压后安装./configure -prefix=/usr/local/
make
make install
make
make install
如果遇到gcc 问题,安装之,
ubuntu 可以使用命令
apt-get install gcc g++ autoconf
2.下载libfastcommon:
git clone https://github.com/happyfish100/libfastcommon.git
进入libfastcommon目录:
./make.sh
./make.sh install
./make.sh install
libfastcommon 和 libevent安装完后确定下命令是否执行成功echo $? 如果不为0则要根据报错去解决。列如确实c++的资源的解析工具。
3.下载fastdfs
wget https://github.com/happyfish100/fastdfs/archive/V5.05.tar.gz
wget https://github.com/happyfish100/fastdfs/archive/V5.05.tar.gz
进入fastdfs目录:
./make.sh
./make.sh install
./make.sh install
启动fastdfs:
fdfs_trackerd /etc/fdfs/tracker.conf
fdfs_storaged /etc/fdfs/storage.conf
如果需要nginx 模块fastdfs-nginx-module,可以通过
git clone https://github.com/happyfish100/fastdfs-nginx-module.git
以为从fastdfs4.05开始就不支持http访问了,所以需要通过http访问的话我们要自己配置一个服务。当然也可以不选择fastdfs-nginx-module。它的优势在于
https://i-blog.csdnimg.cn/blog_migrate/0f0f77d5af552f1a3e941d0142a9391d.png ,

另外本人在启动nginx遇到一个问题:loading shared libraries: libfdfsclient.so: cannot open shared object file: No such file or directory
找不到对应的包 ,通过ldd $(which ‘nginx启动命令’) 显示具体的过程,此时只要找到你libfdfsclient安装好的包添加一个软链接好就好。http://blog.youkuaiyun.com/white__cat/article/details/37923087
至于nginx 模块的配置可以参考http://blog.youkuaiyun.com/u012979009/article/details/55052318