Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Nginx smooth upgrade

2025-04-02 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/03 Report--

Upgrade the Nginx service without stopping the service

Download the new version of Nginx-1.31.2.tar.gz package

1) compile the new version of nginx software

[root@svr5 ~] # tar-zxvf nginx-1.31.2.tar.gz

[root@svr5 ~] # cd nginx-1.31.2

[root@svr5 nginx-1.31.2] #. / configure\

>-- prefix=/usr/local/nginx\ / / specify the installation path

>-- user=nginx\ / / specify a user

>-- group=nginx\ / / specify a group

>-- with-http_stub_status_module\ / / enable status statistics

>-- with-http_ssl_module / / enable SSL encryption

[root@svr5 nginx-1.31.2] # make

2) back up the old nginx main program and replace the old version with the compiled new version of nginx

[root@svr5 nginx-1.31.2] # cd / usr/local/nginx/sbin/

[root@svr5 sbin] # mv nginx nginxold / / back up the old version

[root@svr5 sbin] # cd / root/nginx-1.31.2/objs/

[root@svr5 objs] # cp nginx/ usr/local/nginx/sbin/ copy the new version

[root@svr5 objs] # cd / root/nginx-1.0.5

[root@svr5 nginx-1.31.2] # make upgrade / / upgrade

3) View the new version after the upgrade is completed

[root@svr5] # / usr/local/nginx/sbin/nginx-v / / View the version

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report