Home > Backend Development > PHP Tutorial > nginx starts, restarts, shuts down

nginx starts, restarts, shuts down

WBOY
Release: 2016-07-28 08:28:49
Original
1018 people have browsed it

1. Start

 nginx启动、重启、关闭

cd usr/local/nginx/<span>sbin
.</span>/nginx
Copy after login

2. Restart

Change the configuration and restart nginx

 Query nginx main process number

ps -ef | grep nginx

  Stop gracefully kill -QUIT main process number

Quick stop kill -TERM main process number

Force stop kill -9 nginx

If nginx.conf is configured with the pid file path, if not, then In the logs directory

 kill -Signal type '/usr/local/nginx/logs/nginx.pid'

Four. Upgrade

 1. First replace the old program file with the new program

 2. Kill -USR2 old version program The main process number or process file name

 At this time, the old nginx main process will rename its process file to .oldbin, and then execute the new version of nginx. At this time, the new and old versions will run at the same time

  3. Kill -WINCH the old version of the main process No.

  4. Start the new/old worker process without reloading the configuration

  kill -HUP Old/new version main process number

  Close the old/new process gracefully

  kill -QUIT Old/new process number

  Quickly close the old /New process

  kill -TERM old/new process number

The above introduces the startup, restart, and shutdown of nginx, including the relevant content. I hope it will be helpful to friends who are interested in PHP tutorials.

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template