Nginx Upgrade Guide, the most detailed nginx upgrade steps

Source: Internet
Author: User

View Nginx Current Version

The current version can be viewed with the nginx-v command, and some nginx commands are installed at the current version
[Email protected] 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 version of Nginx 1.44, unzip, enter the directory
Configure using the same configure as above

#./configure--prefix=/nginx_instal
#make

2. Back up the old Nginx file, only need to backup Nginx this file can be

[Email protected] sbin]# mv./nginx./nginx.old

3. Copy the new Nginx to Nginx directory, only need to replace the Nginx file in the Sbin directory
[Email protected] nginx-1.4.4]# CP nginx/nginx_instal/sbin


4. Perform the upgrade
Directly invoke the Nginx command make upgrade to upgrade, the specific code of the upgrade is as follows:

[email protected] nginx-1.4.4]# make upgrade
/nginx_instal/sbin/nginx-t
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 prompts, the upgrade is complete
View the current version again with the/NGINX-V command
[Email protected] 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


Original address: http://www.itmmd.com/201410/71.html
The article is published by the Android Development and distribution, reproduced must be marked by the source.

Nginx Upgrade Guide, the most detailed nginx upgrade steps

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: info-contact@alibabacloud.com 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.