备份旧的配置文件:mv CentOS-Base.repo CentOS-Base.repo.bak@H_404_1@
下载阿里源的文件: wget -O CentOS-Base.repo@H_404_1@ http://mirrors.aliyun.com/repo/Centos-7.repo @H_404_1@
清理缓存@H_404_1@
yum clean all@H_404_1@
重新生成缓存@H_404_1@
yum makecache@H_404_1@
最后会报错:[Errno 14] Could not open/read file:///media/cdrom/repodata/repomd.xml@H_404_1@
@H_404_1@
转载自:http://blog.csdn.net/kevinwang2016/article/details/72418728@H_404_1@
http://blog.163.com/rz_xiaojia/blog/static/11920919820163251413771/ @H_404_1@