When I try:
yum install httpd
I get the error:
Loaded plugins: changelog, fastestmirror
Loading mirror speeds from cached hostfile
* base: mirrors.cloud.aliyuncs.com
* extras: mirrors.cloud.aliyuncs.com
* updates: mirrors.cloud.aliyuncs.com
No package httpd available.
Error: Nothing to do
enter image description here
httpd package can be installed from default CentOS repositories, 'base' and 'updates' (for a newer version).
# repoquery -i httpd | grep -i repo
Repository : updates
Make sure that you have repository file /etc/yum.repos.d/CentOS-Base.repo or create it manually, with, at very least, the following content:
[base]
name=CentOS-$releasever - Base
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os&infra=$infra
gpgcheck=0
enabled=1
[updates]
name=CentOS-$releasever - Updates
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates&infra=$infra
gpgcheck=0
enabled=1
Then do:
# yum clean all && yum update -y && yum install httpd -y
We ran into this issue as well and found the following in yum.conf:
exclude=httpd nginx php mysql mairadb python-psutil python2-psutil
Removing httpd from there let us install it
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With