1、安装gcc (编译时需要)

[root@localhost~]# yum -y install gcc gcc-c++

SRE实战 互联网时代守护先锋,助力企业售后服务体系运筹帷幄!一键直达领取阿里云限量特价优惠。

2、安装libevent ,FastDFS依赖libevent库;

 [root@localhost~]# yum -y install libevent

3、安装libfastcommon

 libfastcommon是FastDFS官方提供的,libfastcommon包含了FastDFS运行所需要的一些基础库。  

(1)上传 libfastcommonV1.0.7.tar.gz到Centos机器上;

(2)将 libfastcommonV1.0.7.tar.gz解压至/usr/local/下:

 

 libfastcommon 下载地址:https://codeload.github.com/happyfish100/libfastcommon/tar.gz/V1.0.7 

(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/

[root@localhost libfastcommon-1.0.7]# ./make.sh   #编译

[root@localhost libfastcommon-1.0.7]# ./make.sh install  #安装

Centos7.2 上部署 FastDFS_V5.05 Linux 第1张

 

(4)libfastcommon安装好后会在/usr/lib64 目录下生成  libfastcommon.so 库文件;

Centos7.2 上部署 FastDFS_V5.05 Linux 第2张

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

 

[root@localhost lib64]# cp /usr/lib64/libfastcommon.so  /usr/lib/

扫码关注我们
微信号:SRE实战
拒绝背锅 运筹帷幄