来源:http://hi.baidu.com/bin_ker/item/5734771077b513ed9813d635
1.首先,打开终端,获取root权限
2.关闭fastestmirror插件
vi/etc/yum/pluginconf.d/fastestmirror.conf
将其中的enable=1选项更改为enable=0
保存并退出
3.然后cd/etc/yum.repos.d/
备份原来的源mvCentOS-Base.repo./CentOS-Base.repo.back
mvCentOS-Media.repo./CentOS-Media.repo.back
4.获取网易的centos5的源配置文件(这里务必要确保你的centos已经连上了Internet)
wgethttp://mirrors.163.com/.help/CentOS-Base-163.repo
5.获取配置文件后,执行
yummakecache
来更新yum数据库
6.执行
yumupdate
来更新centos
若想要更新为sohu的源,将第4步改为
wgethttp://mirrors.sohu.com/help/CentOS-Base-sohu.repo
好了!尽情享受yum带来的无尽的乐趣吧!!!