Skip to content


整理国内centos5 yum源

一,http://ftp.sjtu.edu.cn/centos/,上海交大,但服务器位于北京,中国教育网网络中心,我看像是朝阳区那边的IP,以前在那边上过班,下载速度高达十M。
北方用户与教育网用户推荐,速度飞快。
CentOS版本也挺多,现在用5.2和5.3的用户较新。
CenOS-Base.repo:无连接,麻烦手动

二,http://centos.ustc.edu.cn,中国科技大学,服务器位于合肥。
南方用户推荐。
同样的,CenOS版本非常丰富,适合长期使用。
CenOS-Base.repo:http://centos.ustc.edu.cn/CentOS-Base.repo

三,http://mirrors.sohu.com ,搜狐的开源软件镜像。
已经有了各种Linux、BSD发行版和MySQL,服务器位于山东网通。

四,http://mirrors.163.com,网易的开源软件镜像

以下是手动更新YUM配置文件的方法:

修改/etc/yum.repos.d/CentOS-Base.repo:

[base]
name=CentOS-5 – Base
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever5&arch=$basearch&
repo=os
#baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/
baseurl=http://ftp.sjtu.edu.cn/centos/5.0/os/$basearch/
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos5

#released updates
[update]
name=CentOS-5 – Updates
#mirrorlist=http://mirrorlist.centos.org/?release=4&arch=$basearch&repo=updates
baseurl=http://ftp.sjtu.edu.cn/centos/5.0/updates/$basearch/
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos5

#packages used/produced in the build but not released
[addons]
name=CentOS-5 – Addons
#mirrorlist=http://mirrorlist.centos.org/?release=4&arch=$basearch&repo=addons

baseurl=http://ftp.sjtu.edu.cn/centos/5.0/addons/$basearch/
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos5

#additional packages that may be useful
[extras]
name=CentOS-5 – Extras
#mirrorlist=http://mirrorlist.centos.org/?release=4&arch=$basearch&repo=extras

baseurl=http://ftp.sjtu.edu.cn/centos/5.0/extras/$basearch/
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos5

#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-5 – Plus
#mirrorlist=http://mirrorlist.centos.org/?release=4&arch=$basearch&repo=centosplus
baseurl=http://ftp.sjtu.edu.cn/centos/5.0/centosplus/$basearch/
gpgcheck=1
enabled=0
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos5

#contrib – packages by Centos Users
[contrib]
name=CentOS-5 – Contrib
#mirrorlist=http://mirrorlist.centos.org/?release=4&arch=$basearch&repo=contrib
baseurl=http://ftp.sjtu.edu.cn/centos/5.0/contrib/$basearch/
gpgcheck=1
enabled=0
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos5

2.执行
64位:
rpm –import http://ftp.sjtu.edu.cn/centos/5.0/os/x86_64/RPM-GPG-KEY-CentOS-5

32位:
rpm –import http://ftp.sjtu.edu.cn/centos/5.0/os/i386/RPM-GPG-KEY-CentOS-5

3.执行
yum update

以下是直接下载配置文件的方法,我比较喜欢,当然,前提是需要你联网了。

cd /etc/yum.repos.d
mv CentOS-Base.repo CentOS-Base.repo.save
wget http://centos.ustc.edu.cn/CentOS-Base.repo

参考:http://www.4wei.cn/?p=1000248

Posted in LINUX, 技术.

Tagged with .


No Responses (yet)

Stay in touch with the conversation, subscribe to the RSS feed for comments on this post.



Some HTML is OK

or, reply to this post via trackback.