centos5.5源更新方法(网易163源 很快的源)

http://blog.chinaunix.net/uid-24993824-id-189965.html

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带来的无尽的乐趣吧!!!

以上配置结束之后,要清空yum 缓存,并重建yum缓存,执行以下命令:

yum clean all && yum clean metadata && yum clean dbcache && yum makecache && yum update
原文地址:https://www.cnblogs.com/youngt/p/4025710.html