0)备份(其实不用备份这么多)
cd /usr/local/
cp -r nginx nginx-bak-20220627
1)上传nginx压缩包,data目录下(参考原来的),解压
cd /data
tar -zvxf nginx-1.22.0.tar.gz
2)cd nginx目录下, 执行./configure (获取原nginx的编译参数,cd /usr/local/nginx/sbin/ ./nginx -V 复制,重新编译)
./configure –add-module=../fastdfs-nginx-module/src –prefix=/usr/local/nginx –pid-path=/var/run/nginx/nginx.pid –lock-path=/var/lock/nginx.lock –user=nginx –group=nginx –with-http_ssl_module –with-http_flv_module –with-http_stub_status_module –with-http_gzip_static_module –with-pcre
3)make && make install
4)重启,nginx -s reload,-v 验证版本号
原创文章,作者:carmelaweatherly,如若转载,请注明出处:https://blog.ytso.com/271541.html