CentOS yum源

和pacman apt一样方便

原文: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/
备份原来的源   mv CentOS-Base.repo  ./CentOS-Base.repo.back
               mv CentOS-Media.repo  ./CentOS-Media.repo.back
4.获取网易的centos5的源配置文件 (这里务必要确保你的centos已经连上了Internet)
               wget http://mirrors.163.com/.help/CentOS-Base-163.repo
5.获取配置文件后,执行
               yum makecache   
               来更新yum数据库
6.执行
                yum update
                来更新centos
若想要更新为sohu的源,将第4步改为
                 wget http://mirrors.sohu.com/help/CentOS-Base-sohu.repo
好了!尽情享受yum带来的无尽的乐趣吧!!!

posted @ 2012-11-13 09:44  Leo Forest  阅读(257)  评论(0编辑  收藏  举报