彻底删除CentOS上的Nginx

98 阅读1分钟

本文已参与「新人创作礼」活动,一起开启掘金创作之路。

删除使用yum安装的nginx方法

1.停止Nginx软件

[root@localhost ~]# service nginx stop

2.删除Nginx的自动启动

[root@localhost ~]# chkconfig nginx off

3.从源头删除Nginx

[root@localhost ~]# rm -rf /usr/sbin/nginx
[root@localhost ~]# rm -rf /etc/nginx
[root@localhost ~]# rm -rf /etc/init.d/nginx

4.再使用yum清理

  [root@localhost ~]# yum remove nginx

结束。