// 查询nginx
[root@localhost nginx-1.13.3]# whereis nginx
[root@localhost nginx-1.13.3]# cd /usr/local/nginx/sbin/
// 启动 nginx
[root@localhost sbin]# ./nginx
// 停止 nginx(此方式相当于先查出nginx进程id再使用kill命令强制杀掉进程)
[root@localhost sbin]# ./nginx -s stop
// 停止 nginx(此方式停止步骤是待nginx进程处理任务完毕进行停止)
[root@localhost sbin]# ./nginx -s quit
// 从新加载配置文件(修改配置文件 nginx.conf 可以使用该命令使配置生效)
[root@localhost sbin]# ./nginx -s reload
// 查询 nginx 进程
[root@localhost sbin]# ps aux|grep nginx 或者 ps -ef|grep nginx
nginx 的启动与停止
最新推荐文章于 2023-03-15 10:09:24 发布