FastDfs环境搭建
为了测试项目的文件上传问题,搭建一个FastDFS的服务器,仅是为了测试,所以只搭建了简单的fastDFS,配置一个nginx映射到目录,能正常的读取上传文件即可。非常感谢这位老哥的文章,写的很详细。搭建过程还是中遇到一些问题,后面附上解决办法
1、环境信息
操作系统 CentOs 7 x64
FastDFS版本 V5.05.tar.gz
libfastcommon依赖库 V1.0.7.tar.gz
2、安装配置
① 下载libfastcommon
wget https://github.com/happyfish100/libfastcommon/archive/V1.0.7.tar.gz
② 解压
tar -zxvf V1.0.7.tar.gz
cd libfastcommon-1.0.7
③ 编译、安装
./make.sh
./make.sh install
④ libfastcommon.so 安装到了/usr/lib64/libfastcommon.so,但是FastDFS主程序设置的lib目录是/usr/local/lib,所以需要创建软链接。
ln -s /usr/lib64/libfastcommon.so /usr/local/lib/libfastcommon.so
ln -s /usr/lib64/libfastcommon.so /usr/lib/libfastcommon.so
ln -s /usr/lib64/libfdfsclient.so /usr/local/lib/libfdfsclient.so
ln -s /usr/lib64/libfdfsclient.so /usr/lib/libfdfsclient.so
-----------------------------------------------------------------------