: This article mainly introduces the smooth upgrade of Nginx. if you are interested in the PHP Tutorial, refer to it. Sometimes we need to upgrade our servers to a later version. At this point, if we forcibly stop the server and then upgrade it directly, the process that was originally running on the server will be affected. How can this problem be solved? It can be solved through smooth upgrade. During smooth upgrade, processes that are running will not be stopped. these processes will continue to process requests, but will no longer accept new requests. after these old processes process requests that are still being processed, stop. During this smooth upgrade, new processes process new requests.
1. view the current version
[root@Admin/]# cd /opt/nginx/sbin/[root@Admin sbin]# ./nginx -Vnginx version: nginx/1.8.0built by gcc 4.8.520150623 (Red Hat 4.8.5-4) (GCC) configure arguments: --prefix=/opt/nginx/
2. upgrade to a new version.
Download the new version of the installation package to the/tmp Directory [root @ Admin tmp] # extract the lsnginx-1.8.0.tar.gz to the current directory [root @ Admin tmp] # tar-zxvf nginx-1.9.10.tar.gz to enter the extract Directory for the following operations [root @ Admin tmp] # cd nginx-1.9.10 [root @ Admin nginx-1.9.10] #. /configure [root @ Admin nginx-1.9.10] # make enter the installed nginx Directory, back up the current nginx [root @ Admin nginx-1.9.10] # cd/opt/nginx/sbin/[root @ Admin sbin] # cp nginx. old [root @ Admin sbin] # lsng1_nginx. old copies the new version of the compilation file Installation directory [root @ Admin sbin] # cd/tmp/nginx-1.9.10 [root @ Admin nginx-1.9.10] # lsauto CHANGES CHANGES.ru conf configure contrib html LICENSE Makefile man objs README src [root @ Admin nginx-1.9.10] # cp-rfp objs/nginx/opt/nginx/sbin/cp: overwrite "/opt/nginx/sbin/nginx "? Y check whether the upgrade is successful [root @ Admin nginx-1.9.10] # cd/opt/nginx/sbin/[root @ Admin sbin] #. /nginx-Vnginx version: nginx/1.9.10built by gcc 4.8.520150623 (Red Hat 4.8.5-4) (GCC) configure arguments:
'). AddClass ('pre-numbering '). hide (); $ (this ). addClass ('Has-numbering '). parent (). append ($ numbering); for (I = 1; I <= lines; I ++) {$ numbering. append ($ ('
'). Text (I) ;}; $ numbering. fadeIn (1700) ;}) ;}; script
The above introduces the smooth upgrade of Nginx, including some content, and hope to be helpful to friends who are interested in PHP tutorials.