centos7删除apache
先停止httpd服务:
systemctl stop httpd.service
如果设置了开机启动则关掉
systemctl disable httpd.service
查看httpd依赖包
rpm -qa | grep httpd
上面命令返回结果:
httpd-tools-2.4.6-45.el7.centos.4.x86_64
httpd-2.4.6-45.el7.centos.4.x86_64
挨个删除
rpm -e httpd-tools-2.4.6-45.el7.centos.4.x86_64
rpm -e httpd-2.4.6-45.el7.centos.4.x86_64
注意:如果一个删除失败,可能会报错另一个包在使用它,则先删除另外一个包