Home >Backend Development >PHP Tutorial >Linux Notes (69) - nginx smooth upgrade

Linux Notes (69) - nginx smooth upgrade

WBOY
WBOYOriginal
2016-07-29 08:57:211303browse

If we want to upgrade nginx, it is impossible to stop the server to upgrade in a production environment, so a smooth upgrade is required

Smooth upgrade: During smooth upgrade, if there are worker processes that are processing requests, then these worker processes will continue to process, Stopped after processing. At the same time, nginx will no longer receive new requests. However, during the upgrade process, after the new worker process is started, requests will be received normally.

The so-called new working process here is the working process started after the upgrade

Check the nginx version

<code><span>.</span>/nginx <span>-V</span></code>

Download a higher version of ngxin, unzip it, and then compile it, but do not install it

<code><span>cd</span> ngin
./configure
make</code>

Do not execute make install

Then enter the objs directory. There is a file nginx here. Use this file to replace the original nginx under nginx/sbin/, and the upgrade will be successful.

Note that before replacing nginx, you must first back up the old version of nginx file to prevent accidents

').addClass('pre-numbering').hide(); $(this).addClass('has-numbering').parent().append($numbering); for (i = 1; i ').text(i)); }; $numbering.fadeIn(1700); }); });

The above introduces Linux Notes (69) - nginx smooth upgrade, including aspects of the content. I hope it will be helpful to friends who are interested in PHP tutorials.

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn