在初始环境设置中,我们可以将yum作为一项常驻的服务自动更新系统,但默认的服务器是官方的站点,离中国用户比较远,速度不堪忍受。但修改yum相应配置文件就可以达到高速更新系统的目的,方法如下:
修改/etc/yum.repos.d/CentOS-Base.repo,将镜象站点地址改为在中国的景象站点地址。如下:
[base]
name=CentOS-5 - Base
mirrorlist=http://mirrorlist.
baseurl=http://mirror.centos.
#baseurl=http://ftp.hostrino.
gpgcheck=1
gpgkey=http://mirror.centos.
#released updates
[update]
name=CentOS-5 - Updates
mirrorlist=http://mirrorlist.
baseurl=http://ftp.hostrino.
gpgcheck=1
gpgkey=http://mirror.centos.
#packages used/produced in the build but not released
[addons]
name=CentOS-5 - Addons
mirrorlist=http://mirrorlist.
baseurl=http://ftp.hostrino.
gpgcheck=1
gpgkey=http://mirror.centos.
#additional packages that may be useful
[extras]
name=CentOS-5 - Extras
mirrorlist=http://mirrorlist.
baseurl=http://ftp.hostrino.
gpgcheck=1
gpgkey=http://mirror.centos.
#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-5 - Plus
mirrorlist=http://mirrorlist.
baseurl=http://ftp.hostrino.
gpgcheck=1
enabled=0
gpgkey=http://mirror.centos.
#contrib - packages by Centos Users
[contrib]
name=CentOS-5 - Contrib
mirrorlist=http://mirrorlist.
baseurl=http://ftp.hostrino.
gpgcheck=1
enabled=0
gpgkey=http://mirror.centos.