安装好centos5.264位操作系统后,首先考虑的是升级问题。而升级首先要考虑的是找一个较快的升级站点和镜像站点。经过很多回测试,在电信线路下,上海交通大学的速度在设置以axel加速yum的情况下,白天的速度可达到650k左右,基本可以让各个centos爱好者满意了。下面是具体的设置
一、备份CentOS-Base.repo(在root权限下)
在终端运行:
cp /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.bak
二、替换或者编辑升级站点和镜像内容
1、仍在终端运行:
gedit /etc/yum.repos.d/CentOS-Base.repo
2、清空gedit程序窗口打开的Centos-Base.repo文件里面的内容,将下面的内容粘贴进去。
[base]
name=CentOS-5 - Base
baseurl=http://centos.ustc.edu.cn/centos/5.2/os/x86_64/
gpgcheck=1
gpgkey=http://centos.ustc.edu.cn/centos/RPM-GPG-KEY-centos5
#released updates
[update]
name=CentOS-5 - Updates
baseurl=http://centos.ustc.edu.cn/centos/5.2/updates/x86_64/
gpgcheck=1
gpgkey=http://centos.ustc.edu.cn/centos/RPM-GPG-KEY-centos5
#packages used/produced in the build but not released
[addons]
name=CentOS-5 - Addons
baseurl=http://centos.ustc.edu.cn/centos/5.2/addons/x86_64/
gpgcheck=1
gpgkey=http://centos.ustc.edu.cn/centos/RPM-GPG-KEY-centos5
#additional packages that may be useful
[extras]
name=CentOS-5 - Extras
baseurl=http://centos.ustc.edu.cn/centos/5.2/extras/x86_64/
gpgcheck=1
gpgkey=http://centos.ustc.edu.cn/centos/RPM-GPG-KEY-centos5
#additional packages that extend functionality of existingpackages
[centosplus]
name=CentOS-5 - Plus
baseurl=http://centos.ustc.edu.cn/centos/5.2/centosplus/x86_64/
gpgcheck=1
enabled=0
gpgkey=http://centos.ustc.edu.cn/centos/RPM-GPG-KEY-centos5
#contrib - packages by Centos Users
[contrib]
name=CentOS-5 - Contrib
baseurl=http://centos.ustc.edu.cn/centos/5.2/contrib/x86_64/
gpgcheck=1
enabled=0
gpgkey=http://centos.ustc.edu.cn/centos/RPM-GPG-KEY-centos5
3、导入key。
仍在终端运行:
rpm –importhttp://ftp.sjtu.edu.cn/centos/5.2/os/x86_64/RPM-GPG-KEY-CentOS-5
4、终端运行:yum update
这样你的yum源首选就是上海交大了。