Smooth Nginx upgrade

Source: Internet
Author: User
: 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.

    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.