[root@host /]# yum -y install bind
Loaded plugins: fastestmirror, refresh-packagekit, security
Loading mirror speeds from cached hostfile
Setting up Install Process
No package bind available.
I am used to installing software with yum, and I feel that the downloaded configuration file is broken. So I checked the information on the Internet and finally found the reason: there is a configuration file in Centos that stores various software download information. When installing with yum, it will automatically find the software mirror site. Heard thousands of them. Enter the following path to see:
ls /etc/yum.repos.d/
we will see a file
CentOS-Base.repo
enter command line
cat CentOS-Base.repo
The result is empty.
First backup /etc/yum.repos.d/CentOS-Base.repo
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backupDownload the corresponding version of the repo file and put it in /etc/yum.repos.d/ (please make a corresponding backup before operation)
Run yum makecache to generate the cache.