修改CentOS 5.6的源
$su - root
#cd /etc/yum.repos.d/
#cp CentOS-Base.repo CentOS-Base.repo.bak
#vi CentOS-Base.repo
修改原文为:
[base]
name=CentOS-$releasever-Base
baseurl=http://mirrors.163.com/centos/$releasever/os/$basearch/
gpgcheck=1
gpgkey=http://mirrors.163.com/centos/RPM-GPG-KEY-CentOS-5#released updates
[updates]
name=CentOS-$releasever-Updates
baseurl=http://mirrors.163.com/centos/$releasever/updates/$basearch/
gpgcheck=1
gpgkey=http://mirrors.163.com/centos/RPM-GPG-KEY-CentOS-5#packages used/produced in the build but not released
[addons]
name=CentOS-$releasever-Addons
baseurl=http://mirrors.163.com/centos/$releasever/addons/$basearch/
gpgcheck=1
gpgkey=http://mirrors.163.com/centos/RPM-GPG-KEY-CentOS-5#additional packages that may be useful
[extras]
name=CentOS-$releasever-Extras
baseurl=http://mirrors.163.com/centos/$releasever/extras/$basearch/
gpgcheck=1
gpgkey=http://mirrors.163.com/centos/RPM-GPG-KEY-CentOS-5#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-$releasever-Plus
baseurl=http://mirrors.163.com/centos/$releasever/centosplus/$basearch/
gpgcheck=1
enabled=0
gpgkey=http://mirrors.163.com/centos/RPM-GPG-KEY-CentOSIf you don't want to update kernel
#vi /etc/yum.conf
Add a line to [MAIN] part:
exclude=kernel*
#yum update