CentOS更换网易yum源

最新内容和地址参见http://mirrors.163.com/.help/centos.html

1 首先备份/etc/yum.repos.d/CentOS-Base.repo

mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup

2 以CentOS6.5为例,下载并重命名repo文件

cd /etc/yum.repos.d/
wget http://mirrors.163.com/.help/CentOS6-Base-163.repo
mv CentOS6-Base-163.repo CentOS-Base.repo

3 重新生成yum缓存

yum clean all
yum makecache

 

posted @ 2017-05-14 02:02  su_xtf2009  阅读(158)  评论(0编辑  收藏  举报