解决centos安装不上apache:No match for argument: httpd

Posted 船长博客

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了解决centos安装不上apache:No match for argument: httpd相关的知识,希望对你有一定的参考价值。

找到yum.conf

[root@d78acc291c9e var]# find / -name yum.conf
/etc/yum.conf

注释掉exclude那行,也可只删除httpd

[main]
gpgcheck=1
installonly_limit=3
clean_requirements_on_remove=True
best=True
#exclude=httpd nginx php mysql mairadb python-psutil python2-psutil
//重新安装
yum install httpd -y systemctl enable httpd systemctl start httpd systemctl status httpd

  Active: active (running)

  Status: "Started, listening on: port 80"

[root@d78acc291c9e var]# httpd -v
Server version: Apache/2.4.37 (centos)
Server built:   Dec 23 2019 20:45:34

参考:

https://www.linuxquestions.org/questions/fedora-35/yum-can%27t-find-httpd-or-apache-547678/ 

以上是关于解决centos安装不上apache:No match for argument: httpd的主要内容,如果未能解决你的问题,请参考以下文章

解决centos安装不上apache:No match for argument: httpd

Putty连接Centos7各种连不上问题的解决方案

centos重置镜像后ssh登录不上

在CentOS 8上安装Python

记Centos7和RHEL连接不上网络

centOS挂载不上硬盘怎么解决