1、安装gcc (编译时需要)
[root@localhost~]# yum -y install gcc gcc-c++
2、安装libevent ,FastDFS依赖libevent库;
3、安装libfastcommon
(1)上传 libfastcommonV1.0.7.tar.gz到Centos机器上;
(2)将 libfastcommonV1.0.7.tar.gz解压至/usr/local/下:
(3)切换目录到:/usr/local/libfastcommon-1.0.7/ 下,接着进行编译和安装;
[root@localhost data]# tar -xf V1.0.7.tar.gz
[root@localhost data]# cd libfastcommon-1.0.7/
#编译
#安装


注意:由于FastDFS程序引用usr/lib目录所以需要将/usr/lib64下的库文件拷贝至/usr/lib下。