1, open the centos yum folder
cd /etc/yum.repos.d/
2, download repo file with wget
wget http://mirrors.aliyun.com/repo/Centos-7.repo
If wget command does not take effect, indicating that no installation tool wget,
yum -y install wget
Enter to install.
The current directory is /etc/yum.repos.d/, just downloaded Centos-7.repo also on this directory
3, the original repo file backup system
Hundreds Base.repo mv-cent-Base.repo.bak
I.e., rename-Base.repo CentOs -> CentOs-Base.repo.bak
. 4, the principles of the replacement system file repo
mv Centos-7.repo CentOs-Base.repo
That is to rename Centos-7.repo -> CentOs-Base.repo
5, to perform the command yum update source
yum clean all yum makecache yum update
In order to perform the above three commands that is configured.