1.停止服務
- 從容停止服務--方式比stop溫和
nginx -s stop
- 立即停止服務
nginx -s stop
- systemctl停止
systemctl stop nginx.service
- killall方法殺死進程
killall nginx
2.啟動Nginx
- 直接啟動
nginx
- systemctl命令啟動:
systemctl start nginx.service
3.查看啟動記錄
ps aux|grep nginx
4.重啟Nginx服務
systemctl restart nginx.service
5.重新載入配置文件
nginx -s reload
6.查看端口
netstat -tlnp