LINUX下升级NGINX

进到nginx的安装目录下的sbin

./nginx -V 
#查看命令参数为:(--prefix=/data/soft/nginx --user=root --group=root --with-http_ssl_module --with-http_stub_status_module --with-http_sub_module --with-http_realip_module --with-debug --with-cc=/usr/sfw/bin/gcc --with-stream --with-pcre=/data/soft/pcre-8.32)

进入新版本目录:./configure + 查询到的命令参数 && make

./configure --prefix=/data/soft/nginx --user=root --group=root --with-http_ssl_module --with-http_stub_status_module --with-http_sub_module --with-http_realip_module --with-debug --with-cc=/usr/sfw/bin/gcc --with-stream --with-pcre=/data/soft/pcre-8.32 && make

升级:

#方法一:平滑升级
make upgrade
#方法二:复制新版本目录下的objs下的nginx到老版本安装目录中sbin目录下(注意备份原文件)

posted @ 2025-02-12 11:38  深夜暗月  阅读(309)  评论(0)    收藏  举报