Nginx smooth upgrade

V Records 1,622 Views No comment

1. Before you start, first look the current usage version and compile time parameters:


Copy the compilation parameters, we will use them when compiling the new version.
2. download the new version:

3. after the completion of the implementation, we do not need make install, backup the original binary startup file, and then copy the new version of the startup file

4. Test if the copied file is valid:

5. Send the USR2 signal to the nginx master process. After receiving the USR2 signal, the nginx service first changes the file to, and then executes the new version of the binary file to start the service. If the new service starts successfully, There will be two new Nginx services in the system to provide web services together)

6. Stop the old Nginx service process by sending WINCH signal (slow stop worker process) and QUIT signal (slow stop Nginx service)

7. the final upgrade is complete, finally check the nginx version:


This article was first published by V on 2018-10-03 and can be reprinted with permission, but please be sure to indicate the original link address of the article :

Leave a Reply

Your email address will not be published. Required fields are marked *