-
进入到repo的存放位置
[root@centos ~]# cd /etc/yum.repos.d/
-
2
下载网易的repo
[root@centos yum.repos.d]# wget http://mirrors.163.com/.help/CentOS6-Base-163.repo
-
3
将原来的repo备份
[root@centos yum.repos.d]# mv CentOS-Base.repo CentOS-Base.repo.bak
-
4
将网易的repo更改为默认的源
[root@centos yum.repos.d]# mv CentOS6-Base-163.repo CentOS-Base.repo
-
5
生成缓存
[root@centos yum.repos.d]# yum clean all
[root@centos yum.repos.d]# yum makecache
-
6
验证更新是否正确
[root@centos yum.repos.d]# yum repolist
显示如下图所示,代表更换成功
菜单分类