1、linux版本
centos 7 64
2、备份
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.bak
3、下载国内的yum源(此处使用aliyun)至/etc/yum.repos.d/
cd /etc/yum.repos.d/
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
4、运行yum makecache生成缓存
yum makecache
5、验证
这时候再更新系统就会看到以下mirrors.aliyun.com信息
yum -y update