1. Back up the original image file first
cp -r yum.repos.d/ yum.repos.d.backup
2. Download the new one CentOS-Base.repo
to/etc/yum.repos.d/
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.163.com/.help/CentOS7-Base-163.repo
3. Replace each of baseurl
the following with , replace with$releasever
7
$basearch
x86_64
3. Clear the original yum cache
yum clean all
4.yum makecache
yum makecache