环境:
centos7 x86-64两台:
172.20.146.31 storage
172.20.146.32 storage tracker nginx
下载安装包:
https://github.com/happyfish100/fastdfs/archive/refs/tags/V6.06.tar.gz
https://github.com/happyfish100/libfastcommon/archive/refs/tags/V1.0.43.zip
https://nginx.org/download/nginx-1.16.1.tar.gz
https://github.com/happyfish100/fastdfs-nginx-module/archive/refs/tags/V1.22.tar.gz
所有主机安装依赖:
yum -y install cmake make gcc-c++ unzip
1、安装libfastcommon
mkdir -p /usr/local/fastdfs unzip libfastcommon-1.0.43.zip -d /usr/local/fastdfs/ cd /usr/local/fastdfs/libfastcommon-1.0.43/ #make ./make.sh #make install ./make.sh install #软连接 ln -s /usr/lib64/libfastcommon.so /usr/local/lib/libfastcommon.so ln -s /usr/local/lib64/libfdfsclient.so /usr/local/lib/libfdfsclient.so ln -s /usr/local/lib64/libfdfsclient.so /usr/lib/libfdfsclient.so
2、安装fastdfs
#解压
tar zxf fastdfs-6.06.tar.gz -C /usr/local/fastdfs/ cd /usr/local/fastdfs/fastdfs-6.06/
vim make.sh #修改此路径
保存后,依次执行:
./make.sh ./make.sh install
3、配置tracker server
#创建数据目录
mkdir -p /data/fastdfs/tracker
#cp 配置文件
cp /etc/fdfs/tracker.conf.sample /etc/fdfs/tracker.conf
#编辑配置,我这里只改了base_path
vim /etc/fdfs/tracker.conf
vim vim /etc/init.d/fdfs_trackerd
#启动tracker server
/etc/init.d/fdfs_trackerd start /etc/init.d/fdfs_trackerd status
可以把启动命令写进/etc/rc.d/rc.local ,设置为开机自启动;
4、配置storage
#cp 配置文件,创建存储目录 cp /etc/fdfs/storage.conf.sample
/etc/fdfs/storage.conf
mkdir -p /data/fastdfs/storage/base mkdir -p /data/fastdfs/storage/store
vim /etc/fdfs/storage.conf
改了三个地方:base_path、store_path、tracker_server
标签:etc,部署,fastdfs,FastDFS6.06,nginx,tracker,usr,fdfs,local From: https://www.cnblogs.com/weiyiming007/p/17099460.html