cd /etc/yum.repos.d
sudo mv CentOS-Base.repo CentOS-Base.repo.bak
sudo wget -O CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
yum clean all
yum makecache
centos7 修改yum源为阿里源
原文:http://www.cnblogs.com/flying607/p/6711326.html