tracker server and client:192.168.1.42
storage server:192.168.1.46
storage server:192.168.1.53
安装:
安装依赖包libfastcommon
安装fastDFS
需要关闭iptables、selinux
yum -y install epel-release
yum -y install git
下载地址:
git clone https://github.com/happyfish100/fastdfs.git
git clone https://github.com/happyfish100/libfastcommon.git
git clone https://github.com/happyfish100/fastdfs-nginx-module.git
tracker server配置:
[[email protected] ~]# cd libfastcommon-1.0.36
[[email protected] libfastcommon-1.0.36]# ./make.sh
[[email protected] libfastcommon-1.0.36]# ./make.sh install
[[email protected] libfastcommon-1.0.36]#
[[email protected] ~]# cd fastdfs-5.0.10
[[email protected] fastdfs-5.0.10]# ./make.sh
[[email protected] fastdfs-5.0.10]# ./make.sh install
cd /etc/fdfs/cp tracker.conf.sample tracker.conf修改配置文件disabled=false #启用配置文件
port=22122 #设置tracker的端口号
base_path=/data/fastdfs/trackerd #设置tracker的数据文件和日志目录(需预先创建)
http.server_port=18080 #设置http端口号
mkdir -p /data/fastdfs/trackerd/usr/bin/fdfs_trackerd /etc/fdfs/tracker.conf restart设置开机启动echo '/usr/bin/fdfs_trackerd /etc/fdfs/tracker.conf restart' >> /etc/rc.d/rc.local[[email protected] ~]# cd libfastcommon-1.0.36
[[email protected] libfastcommon-1.0.36]# ./make.sh
[[email protected] libfastcommon-1.0.36]# ./make.sh install
[[email protected] libfastcommon-1.0.36]#
[[email protected] ~]# cd fastdfs-5.0.10
[[email protected] fastdfs-5.0.10]# ./make.sh
[[email protected] fastdfs-5.0.10]# ./make.sh install
cd /etc/fdfs/cp tracker.conf.sample tracker.conf修改配置文件disabled=false #启用配置文件
port=23000 http.server_port=18888 #设置http端口号
增加nginx upstream:
yum -y install epel-release
yum -y install nginx
位于http{}