cd /etc/yum.repos.d cp CentOS-Base.repo CentOS-Base.repo.bak
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
yum makecache yum -y update
若是在yum makecache的過程當中一直報:
Another app is currently holding the yum lock; waiting for it to exit...
沒必要慌張,輸入如下命令便可shell
rm -f /var/run/yum.pid