PS: 保证 Nginx 服务器节点和 storage节点的路径一致
操作 Storage Server 服务器节点
tar -zxvf fastdfs-nginx-module-1.22.tar.gz
解压上传的 nginx-fastdfs模块包cd /home/software/fastdfs-nginx-module-1.22/src
vim config
cp mod_fastdfs.conf /etc/fdfs/
拷贝链接的配置文件yum install -y pcre pcre-devel
yum install -y zlib zlib-devel
yum install -y openssl openssl-devel
tar -zxvf nginx-1.16.1.tar.gz
mkdir /var/temp/nginx -p
cd /home/software/nginx-1.16.1
./configure \ --prefix=/usr/local/nginx \ --pid-path=/var/run/nginx/nginx.pid \ --lock-path=/var/lock/nginx.lock \ --error-log-path=/var/log/nginx/error.log \ --http-log-path=/var/log/nginx/access.log \ --with-http_gzip_static_module \ --http-client-body-temp-path=/var/temp/nginx/client \ --http-proxy-temp-path=/var/temp/nginx/proxy \ --http-fastcgi-temp-path=/var/temp/nginx/fastcgi \ --http-uwsgi-temp-path=/var/temp/nginx/uwsgi \ --http-scgi-temp-path=/var/temp/nginx/scgi \ --add-module=/home/software/fastdfs-nginx-module-1.22/src
make
make install
cd /etc/fdfs/
vim mod_fastdfs.conf
mkdir /usr/local/fastdfs/tmp
cd /usr/local/nginx/conf/
vim nginx.conf
server { listen 8888; server_name localhost; location /beyond/M00 { ngx_fastdfs_module; } }
../sbin/nginx -t
检测nginx配置../sbin/nginx
启动nginx上一节最后保存的图片名称为: wKhcmGDbPF-ASdoRAAAVWK-BYbY482.jpg
浏览器访问我们的 srorage server 节点: http://192.168.92.152:8888/beyond/M00/00/00/20210328103402865.jpg
下载: