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

How to stop nginx service under linux

王林
Release: 2020-08-12 17:01:33
forward
6858 people have browsed it

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
Copy after login

2. Stop the Nginx service

Stop the nginx service calmly

$ kill -QUIT 主进程号
Copy after login

For example:

kill -QUIT 16391
Copy after login

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

Quickly stop Nginx:

$ kill -TERM 主进程号
Copy after login

This will be faster than the above method.

Force to stop Nginx:

$ kill -9 主进程号
Copy after login

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!

Related labels:
source:csdn.net
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