安装FastDFS服务
1.1 安装编译环境
yum install git gcc gcc-c++ make automake autoconf libtool pcre pcre-devel zlib zlib-devel openssl-devel wget vim -y
1.2 安装libfast
1)进入/home/admin/taishi-deploy-docker/src/fdfs/libfastcommon-1.0.38目录
2)执行编译./make.sh
3)执行安装./make.sh install
1.3 安装fastdfs
1)进入/home/admin/taishi-deploy-docker/src/fdfs/fastdfs-5.11目录
2)执行编译./make.sh
3)执行安装./make.sh install
1.4 创建软链接
1)ln -s /usr/lib64/libfastcommon.so /usr/local/lib/libfastcommon.so
2)ln -s /usr/lib64/libfastcommon.so /usr/lib/libfastcommon.so
#如报已存在的情况忽略即可。
1.5 安装nginx
有可以跳过
cp -r /home/admin/taishi-deploy-docker/src/nginx /home/admin/runtime
1.6 创建运行目录
mkdir /app/data01/fastdfs
1.7 复制配置文件
cp /home/admin/taishi-deploy-docker/src/fdfs/conf/* /etc/fdfs
1.8 启动服务
可跳过
12.8.1启动nginx
/home/admin/runtime/nginx/sbin/nginx -c /home/admin/runtime/nginx/conf/nginx.conf
12.8.2启动storage
/usr/bin/fdfs_storaged /etc/fdfs/storage.conf start
12.8.3启动tracker
/usr/bin/fdfs_trackerd /etc/fdfs/tracker.conf start
nginx添加配置
location ~/group[0-9]/ { #limit_conn one 10; limit_rate 10240k; ngx_fastdfs_module; }
#安装基本依赖
useradd -s /sbin/nologin mockbuild
rpm -ivh --force --nodeps ../src/fdfs/fdfs_rpm/*.rpm
rpm -ivh --force --nodeps ../src/base_rpm/font_rpm/*.rpm
rpm -ivh --force --nodeps ../src/base_rpm/os_rpm/*.rpm
sed -i 's/__ip__/'$ip'/' /etc/fdfs/storage.conf
sed -i 's/__ip__/'$ip'/' /etc/fdfs/mod_fastdfs.conf
sed -i 's/__ip__/'$ip'/' /etc/fdfs/client.conf
依赖下载:
链接:https://pan.baidu.com/s/13k5WjuyZHRoql1rVHClj6w
提取码:nu1d