卸载 centos7 yum安装的nginx
停止Nginx软件
service nginx stop
[root@BizMsTestAlpha core]# service nginx stop
Redirecting to /bin/systemctl stop nginx.service
删除Nginx的自动启动
chkconfig nginx off
[root@BizMsTestAlpha core]# chkconfig nginx off
Note: Forwarding request to 'systemctl disable nginx.service'.
Removed symlink /etc/systemd/system/multi-user.target.wants/nginx.service.
从源头删除Nginx
rm -rf /usr/sbin/nginx
rm -rf /etc/nginx
rm -rf /etc/init.d/nginx
再使用yum清理
yum remove nginx
删除安装的内容
rm -rf /usr/local/nginx
(注:yum安装的应该是安装在 /usr/local 下)
查找删除一些残留文件
[root@BizMsTestAlpha core]# find / -name "nginx"
/usr/lib64/nginx
/usr/share/nginx
/var/lib/nginx
/var/log/nginx
[root@BizMsTestAlpha core]#
删除上面目录文件
如果搜索到docker容器里面的nginx信息 就不要去删了