Share the most detailed nginx upgrade procedure Guide

Source: Internet
Author: User

View current nginx version

You can view the current version by running the nginx-V command.
[Root @ localhost sbin] #./nginx-V
Nginx version: nginx/1.2.9
Built by gcc 4.4.7 20120313 (Red Hat 4.4.7-3) (GCC)
Configure arguments: -- prefix =/nginx_instal

1. Download the new nginx 1.44 version. Decompress the package and enter the directory.
Use the same configure as above for configuration

#./Configure -- prefix =/nginx_instal
# Make

2. Back up the old nginx file. You only need to back up the nginx file here.

[Root @ localhost sbin] # mv./nginx./nginx. old

3. Copy the new nginx file to the nginx Directory. You only need to replace the nginx file under the sbin directory.
[Root @ localhost nginx-1.4.4] # cp nginx/nginx_instal/sbin

4. Perform upgrade
Directly call the nginx command make upgrade for upgrade. The upgrade code is as follows:

[Root @ localhost nginx-1.4.4] # make upgrade
Nginx: the configuration file/nginx_instal/conf/nginx. conf syntax is OK
Nginx: configuration file/nginx_instal/conf/nginx. conf test is successful
Kill-USR2 'cat/nginx_instal/logs/nginx. pid'
Sleep 1
Test-f/nginx_instal/logs/nginx. pid. oldbin
Kill-QUIT 'cat/nginx_instal/logs/nginx. pid. Oldbin'

5. If no error message is displayed, the upgrade is complete.
Run the/nginx-V command again to view the current version.
[Root @ localhost sbin] #./nginx-V
Nginx version: nginx/1.4.4
Built by gcc 4.4.7 20120313 (Red Hat 4.4.7-3) (GCC)
Configure arguments: -- prefix =/nginx_instal

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.