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

转载于:https://www.cnblogs.com/Magicworks/archive/2009/03/12/1409812.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值