cd /etc/yum.repos.d 备份旧的配置文件:mv 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