浏览文章
文章信息
LINUX CentOS7完全卸载nginx
12473
1、查找nginx相关文件或者文件夹
find / -name nginx
2、检查nginx进程
ps -ef | grep nginx[root@localhost /]# ps -ef |grep nginx root 3163 2643 0 14:08 tty1 00:00:00 man nginx root 5427 1 0 14:50 ? 00:00:00 nginx: master process nginx nginx 5428 5427 0 14:50 ? 00:00:00 nginx: worker process root 5532 2746 0 14:52 pts/0 00:00:00 grep --color=auto nginx3、停止nginx进程
[root@localhost /]# /usr/sbin/nginx -s stop [root@localhost /]# netstat -lntp Active Internet connections (only servers) Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN 1/systemd tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 1261/sshd tcp6 0 0 :::111 :::* LISTEN 1/systemd tcp6 0 0 :::22 :::* LISTEN 1261/sshd
4、删除所有相关nginx的文件或者文件夹
whereis nginxrm -r /var/lib/nginx rm -r /var/log/nginx ......
5、yum清理
yum remove nginx