Blogger Information
Blog 81
fans 1
comment 0
visits 124131
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
Nginx 安装 和 基本命令
有什么是忘不了的的博客
Original
863 people have browsed it

Yum安装

    注:请以root权限执行 

    安装命令:# yum install -y nginx

    启动Nginx并设置开机自启

    systemctl start nginx

    systemctl enable nginx

Nginx常用命令

    启动:nginx

    查看nginx进程id:ps -ef | grep nginx

`%%GFX2CG~3JTP~()5N_I)W.png

    平滑停止: kill -QUIT 主进程id 

    快速停止:kill -TERM | INT  主进程id 

    强制停止:pkill -9 nginx

    平滑重启:kill -HUP 主进程id    

    平滑升级:不知道为什么,我第一次测试的时候可以,后来在测试的时候,第二条命令失败了,说找不到文件.oldbin

                    kill -USR2 `cat /run/nginx.pid`
                    kill -QUIT `cat /run/nginx.pid.oldbin`

                    kill -WINCH     旧版本的主进程id

                    /run/nginx.pid 是nginx.pid文件路径 在nginx.conf中有配置。


                    


Statement of this Website
The copyright of this blog article belongs to the blogger. Please specify the address when reprinting! If there is any infringement or violation of the law, please contact admin@php.cn Report processing!
All comments Speak rationally on civilized internet, please comply with News Comment Service Agreement
0 comments
Author's latest blog post