CentOS 5.2 中国镜像 /etc/yum.repos.d/CentOS-Base.repo

在初始环境设置中,我们可以将yum作为一项常驻的服务自动更新系统,但默认的服务器是官方的站点,离中国用户比较远,速度不堪忍受。但修改yum相应配置文件就可以达到高速更新系统的目的,方法如下:

修改/etc/yum.repos.d/CentOS-Base.repo,将镜象站点地址改为在中国的景象站点地址。如下:

[base]

name=CentOS-5 - Base

mirrorlist=http://mirrorlist.centos.org/?release=$releasever5&arch=x86_64&repo=os

baseurl=http://mirror.centos.org/centos/5/os/x86_64/

#baseurl=http://ftp.hostrino.com/pub/centos/5.2/os/x86_64/

gpgcheck=1

gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5

#released updates

[update]

name=CentOS-5 - Updates

mirrorlist=http://mirrorlist.centos.org/?release=4&arch=x86_64&repo=updates

baseurl=http://ftp.hostrino.com/pub/centos/5.2/updates/x86_64/

gpgcheck=1

gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5

#packages used/produced in the build but not released

[addons]

name=CentOS-5 - Addons

mirrorlist=http://mirrorlist.centos.org/?release=4&arch=x86_64&repo=addons

baseurl=http://ftp.hostrino.com/pub/centos/5.2/addons/x86_64/

gpgcheck=1

gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5

#additional packages that may be useful

[extras]

name=CentOS-5 - Extras

mirrorlist=http://mirrorlist.centos.org/?release=4&arch=x86_64&repo=extras

baseurl=http://ftp.hostrino.com/pub/centos/5.2/extras/x86_64/

gpgcheck=1

gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5

#additional packages that extend functionality of existing packages

[centosplus]

name=CentOS-5 - Plus

mirrorlist=http://mirrorlist.centos.org/?release=4&arch=x86_64&repo=centosplus

baseurl=http://ftp.hostrino.com/pub/centos/5.2/centosplus/x86_64/

gpgcheck=1

enabled=0

gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5

#contrib - packages by Centos Users

[contrib]

name=CentOS-5 - Contrib

mirrorlist=http://mirrorlist.centos.org/?release=4&arch=x86_64&repo=contrib

baseurl=http://ftp.hostrino.com/pub/centos/5.2/contrib/x86_64/

gpgcheck=1

enabled=0

gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5