1. FASTDFS环境搭建
1.1 安装插件依赖包
全程采用ROOT用户
yum -y install gcc libevent libevent-devel -y
libevent-devel 这个依赖包 我是安装失败了采用离线安装
tar zxvf libevent-1.2.tar.gz
cd libevent-1.2
./configure –prefix=/usr
make && make install
2 安装 libfastcommon
2.1 解压
unzip libfastcommon-1.0.36.zip
2.2 编译并安装
./make.sh && ./make.sh install
3 安装 fastdfs
3.1 解压
unzip fastdfs-5.11.zip
3.2 编译并安装
./make.sh && ./make.sh install
验证
- 安装成功的话,/usr/bin 下会有 fdfs_* 开头的命令,可以验证
- 安装成功后,FastDFS会安装在/etc/fdfs目录下:
[root@localhost fastdfs-5.11]# ll /etc/fdfs/
总用量 76
-rw-r–r--. 1 root root 316 1月 17 11:47 client.conf
-rw-r–r--. 1 root root 1461 1月 17 11:25 client.conf.sample
-rw-r–r--. 1 root root 955 1月 17 13:20 http.conf
-rw-r–r--. 1 root root 31172 1月 17 13:21 mime.types
-rw-r–r--. 1 root root 3716 1月 17 12:57 mod_fastdfs.conf
-rw-r–r--. 1 root root 1278 1月 17 11:40 storage.conf
-rw-r–r--. 1 root root 7927 1月 17 11:25 storage.conf.sample
-rw-r–r--. 1 root root 105 1月 17 11:25 storage_ids.conf.sample
-rw-r–r--. 1 root root 1356 1月 17 11:34 tracker.conf
3.3 配置fdfs
[root@localhost fdfs]# cp client.conf.sample client.conf
[root@localhost fdfs]# cp storage.conf.sample storage.conf
[root@localhost fdfs]# cp tracker.conf.sample tracker.conf
我的规化是将,日志以及一些文件都放在新挂载的目录下,结构如下:
[root@JGY-CXHBFGSAPP-f