思路
- 查找Apache服务相关的软件,卸载软件,删除相关文件夹,验证是否卸载成功
- 方法一
-
[root@localhost /]# rpm -qa|grep httpd #查看已安装的Apache服务 httpd-itk-2.4.7.04-2.el7.x86_64 httpd-devel-2.4.6-97.el7.centos.5.x86_64 httpd-tools-2.4.6-97.el7.centos.5.x86_64 httpd-manual-2.4.6-97.el7.centos.5.noarch httpd-2.4.6-97.el7.centos.5.x86_64 [root@localhost /]# yum remove -y httpd #卸载服务 httpd:[root@localhost /]# rpm -qa|grep httpd #验证一下,还有一个未卸载 httpd-tools-2.4.6-97.el7.centos.5.x86_64 [root@localhost /]# rpm -e httpd-tools-2.4.6-97.el7.centos.5.x86_64 #重新卸载一下 [root@localhost /]# rpm -qa|grep httpd #再验证一下 [root@localhost /]# whereis httpd #查找安装路径 httpd: /etc/httpd [root@localhost /]# rm -rf /etc/httpd #删除安装路径 [root@localhost /]# whereis httpd #验证一下 httpd:[root@localhost /]# #出现这个,卸载完成
- 方法二
-
卸载已安装的Apache服务器软件 [root@localhost /]# dnf remove httpd #注:如果提示bash: dnf:未找到命令则需要安装dnf命令,分别执行下列两个命令 [root@localhost /]# yum install epel-release [root@localhost /]# yum install dnf #再次检查是否安装了Apache服务器软件 [root@localhost /]# rpm -qa | grep -i httpd
暂无评论...