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