Home >Operation and Maintenance >Nginx >How to stop nginx service under linux

How to stop nginx service under linux

王林
王林forward
2020-08-12 17:01:336823browse

How to stop nginx service under linux

When new functions are launched, the server needs to be stopped to prevent users from operating additional data during the update process.

(Recommended tutorial: nginx tutorial)

1. Check the nginx main process:

$ ps -ef | grep nginx

2. Stop the Nginx service

Stop the nginx service calmly

$ kill -QUIT 主进程号

For example:

kill -QUIT 16391

This method will relatively have a stopping process, first stop the child process, and then stop the main process.

Quickly stop Nginx:

$ kill -TERM 主进程号

This will be faster than the above method.

Force to stop Nginx:

$ kill -9 主进程号

This method is the last method, force stop.

The above is the detailed content of How to stop nginx service under linux. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:csdn.net. If there is any infringement, please contact admin@php.cn delete