查看是谁占用 8888 端口 (loonflow) root@dev:~# netstat -anptu | grep 8888 tcp 0 0 0.0.0.0:8888 0.0.0.0:* LISTEN 6556/nginx: master 关闭 nginx (loonflow) root@dev:~# systemctl stop nginx.service
1.从容停止服务 这种方法较stop相比就比较温和一些了,需要进程完成当前工作后再停止。 nginx -s quit 2.立即停止服务 这种方法比较强硬,无论进程是否在工作,都直接停止进程。 nginx -s stop 3.systemctl 停止 systemctl属于Linux命令 systemctl stop nginx.service 4.killall 方法杀死进程 直接杀死进程,在上面无效的情况下使用,态度强硬,简单粗暴! killall nginx
1.nginx直接启动 nginx 2.systemctl命令启动 systemctl start nginx.service 3.查看启动后记录 ps aux | grep nginx 4.重启Nginx服务 systemctl restart nginx.service 5.重新载入配置文件 nginx -s reload 6.查看端口号 netstat -tlnp
原文:https://www.cnblogs.com/shensy/p/14008055.html