1. 相关依赖配置
1.需要安装 gcc
yum install gcc-c++
2.安装libevent【FastDFS依赖libevent库】
yum -y install libevent
3.安装libfastcommon
1. 将libfastcommonV1.0.7.tar.gz拷贝至/usr/local/下
2. tar -zxvf libfastcommonV1.0.7.tar.gz
3. cd libfastcommon-1.0.7
4. ./make.sh
5. ./make.sh install
#将/usr/lib64下的库文件拷贝至/usr/lib下
6. ll /usr/lib64/
4.安装libevent
1. 将libevent-2.0.15-stable.tar.gz 拷贝至/usr/local/下
2. tar -zxvf libevent-2.0.15-stable.tar.gz
3. cd libevent-2.0.15-stable/
4. ./configure
5. make && make install
6. ln -s /usr/local/lib/libevent-2.0.so.5 /usr/lib/libevent-2.0.so.5
2. tracker编译安装
1.将FastDFS_v5.05.tar.gz拷贝至/usr/local/下
2. tar -zxvf FastDFS_v5.05.tar.gz
3. cd FastDFS
4. ./make.sh
5. ./make.sh install
#安装成功将安装目录下的conf下的文件拷贝到/etc/fdfs/下
6. cp -ri conf/* /etc/fdfs
#进入/etc/fdfs目录
7. cd /etc/fdfs
#修改tracker.conf 文件下内容
8. vim tracker.conf
base_path=/home/FastDFS
http.server_port=80
#创建目录
9. mkdir -p /home/fastdfs
#启动
9. /usr/bin/fdfs_trackerd /etc/fdfs/tracker.conf restart
#查看开启状态
10.ps aux|grep dfs
3. storage编译安装
如果是在同一台linux上则从tracker安装编译的第7步开始,
如果不是,则从相关依赖配置到tarcker编译安装的前7步
1. cd /etc/fdfs
#修改storage.conf文件内容
2. vi storage.conf
group_name=group1
base_path=/home/yuqing/FastDFS改为:base_path=/home/fastdfs
store_path0=/home/fastdfs/fdfs_storage
#tracker服务器:IP如果有多个则配置多个tracke
tracker_server=192.168.1.88:22122
http.server_port=80
#创建文件夹
3. mkdir -p /home/fastdfs/fdfs_storage
#启动
4. /usr/bin/fdfs_storaged /etc/fdfs/storage.conf restart
#查看开启状态
5. ps aux|grep dfs