把centos的yum源换成国内的源。
cd /etc/yum.repos.d
cp CentOS-Base.repo CentOS-Base.repo.bak
wget -O CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
yum clean all
yum makecache
yum -y update
国内其他yum源:
wget http://mirrors.163.com/.help/CentOS7-Base-163.repo