fastfs 安装:
1.安装gcc
#yum install make cmake gcc gcc-c++
2.下载使用包
在http://code.google.com/p/fastdfs/downloads/list下载所需文件,此外还需先安装好libevent。
FastDFS内部使用libevent作为http服务器,如果使用apache或者nginx作为http服务器,该步骤可以不需要。
如果系统已经安装libevent,需要先卸载,命令如下:
yum –y remove libevent
安装libevent,命令如下
#tar -xvf libevent-2.0.20-stable.tar.gz
#cd libevent
#./configure –prefix=/usr
#make
#make install
下载fastdfs软件包:
#wget https://sourceforge.net/projects/fastdfs/files/FastDFS%20Server%20Source%20Code/FastDFS%20Server%20with%20PHP%20Extension%20Source%20Code%20V5.08/FastDFS_v5.08.tar.gz
下载libfastcommon软件包:
# wget -O listfastcommon-master.zip https://github.com/happyfish100/libfastcommon/archive/master.zip
3.安装libfastcommon
# unzip libfastcommon-master.zip -d /usr/local/fast
# cd /usr/local/fast/libfastcommon-master/
# ./make.sh
# ./make.sh install
注意安装的路径:libfastcommon默认安装到了/usr/lib64/这个
4.进行软链接创建
FastDFS主程序设置的目录为/usr/local/lib/,而我们的安装目录为/usr/lib64,所以我们需要创建/
usr/lib64/下的一些核心执行程序的软连接文件。
创建目录(如果不存在)
#mkdir /usr/local/lib/
创建软链接
#ln -s /usr/lib64/libfastcom