#解压安装文件[root@node2 package]# tar -zxvf nginx-1.15.4.tar.gz
nginx-1.15.4/
nginx-1.15.4/auto/
#进入安装文件目录[root@node2 package]# cd nginx-1.15.4# 为 nginx 添加 fastdfs 模块[root@node2 nginx-1.15.4]# ./configure --add-module=/etc/fdfs/package/fastdfs-nginx-module-1.20/src
checking for OS
+ Linux 3.10.0-957.27.2.el7.x86_64 x86_64
…
creating objs/Makefile
Configuration summary
+ using system PCRE library
+ OpenSSL library is not used
+ using system zlib library
nginx path prefix: "/usr/local/nginx"
nginx binary file: "/usr/local/nginx/sbin/nginx"
nginx modules path: "/usr/local/nginx/modules"
nginx configuration prefix: "/usr/local/nginx/conf"
nginx configuration file: "/usr/local/nginx/conf/nginx.conf"
nginx pid file: "/usr/local/nginx/logs/nginx.pid"
nginx error log file: "/usr/local/nginx/logs/error.log"
nginx http access log file: "/usr/local/nginx/logs/access.log"
nginx http client request body temporary files: "client_body_temp"
nginx http proxy temporary files: "proxy_temp"
nginx http fastcgi temporary files: "fastcgi_temp"
nginx http uwsgi temporary files: "uwsgi_temp"
nginx http scgi temporary files: "scgi_temp"#编译安装[root@node2 nginx-1.15.4]# make && make install
…
test -d '/usr/local/nginx/html' \
||cp -R html '/usr/local/nginx'test -d '/usr/local/nginx/logs' \
||mkdir -p '/usr/local/nginx/logs'
make[1]: 离开目录“/etc/fdfs/package/nginx-1.15.4”
11. 配置tracker
#创建数据文件夹[root@node2 home]# mkdir /home/fastdfs_tracker# 编辑配置文件
vim /etc/fdfs/tracker.conf
# 修改下面配置# false for enabled# true for disabled
disabled=false
# bind an address of this host# empty for bind all addresses of this host
bind_addr=# the tracker server port
port=22122
# connect timeout in seconds# default value is 30s
connect_timeout=30
# network timeout in seconds# default value is 30s
network_timeout=60
# the base path to store data and log files
base_path=/home/fastdfs_tracker
# max concurrent connections this server supported
max_connections=256
# 数据和日志文件存储根目录[root@node2 home]# mkdir /home/fastdfs_storage[root@node2 fdfs]# mkdir /home/fastdfs_storage/data# 修改配置文件cp /etc/fdfs/storage.conf /etc/fdfs/storage-group1.conf
vim /etc/fdfs/storage-group1.conf
#需要修改的内容如下:#启用配置文件
disabled=false
#设置storage的端口号,默认是23000,同一个组的storage端口号必须一致
port=23000
#组名,根据实际情况修改
group_name=group1
#设置storage的日志目录(需预先创建)
base_path=/home/fastdfs_storage
#存储路径个数,需要和store_path个数匹配
store_path_count=1
# 第一个存储数据的目录(需预先创建)
store_path0=/home/fastdfs_storage/data
# tracker服务器的IP地址和端口号(注意的是这个和虚拟机的IP地址一样)
tracker_server=192.168.71.100:22122
# http访问文件的端口(默认8888,看情况修改,和nginx中保持一致)# the port of the web server on this storage server
http.server_port=8888