nginx版本升级

1)下载nginx,并解压:
https://nginx.org/en/download.html
wget https://nginx.org/download/nginx-1.26.2.tar.gz

2)查看现有版本(老版本)nginx 的 configure 配置信息
nginx -V

 3)在解压目录,进行 make.进行编译,切记千万不要输入 make install

这样,在解压目录下会多出来一个objs目录

4)对老版本 sbin 目录下的 nginx 进行备份:

mv /usr/local/nginx/sbin/nginx /usr/local/nginx/sbin/nginx.old

5)将编译好的 objs 目录下的 nginx 文件,复制到 /usr/local/nginx/sbin 目录。

6)对 nginx 升级,在解压目录 执行命令:make upgrade

 

参考资料:

https://jingyan.baidu.com/article/63acb44aeb693520fcc17e8b.html
https://blog.csdn.net/xiaojin21cen/article/details/127444163

posted on 2024-11-26 17:26  我和你并没有不同  阅读(346)  评论(0)    收藏  举报