Centos7.2 上部署 FastDFS_V5.05

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

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

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  #安装

 

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

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

 

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

posted @ 2018-08-31 16:57  ~锦瑟年华  Views(559)  Comments(0)    收藏  举报