CentOS7
CentOS6
CentOS5
4、运行yum makecache生成缓存
5、这时候再更新系统就会看到以下mirrors.163.com信息
#yum-yupdate
已加载插件:fastestmirror,refresh-packagekit,security
设置更新进程Loadingmirrorspeedsfromcachedhostfile
*base:mirrors.163.com
*extras:mirrors.163.com
*updates:mirrors.163.com
|
修改CentOS默认yum源为mirrors.aliyun.com
1、首先备份系统自带yum源配置文件/etc/yum.repos.d/CentOS-Base.repo
#wget-O/etc/yum.repos.d/CentOS-Base.repohttp://mirrors.aliyun.com/repo/Centos-6.repo
#wget-O/etc/yum.repos.d/CentOS-Base.repohttp://mirrors.aliyun.com/repo/Centos-5.repo
3、运行yum makecache生成缓存