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