由于非得使用4.7的版本,所以找了一大圈,终于发现了一个能用的源:
http://mirrors.usc.edu/pub/linux/distributions/centos/4.8/
更新方法如下:
vi /etc/yum.repos.d/CentOS-Base.repo
内容如下:
[base]
name=CentOS-$releasever - Base
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os
#baseurl=http://mirror.centos.org/centos/$releasever/addons/$basearch/
baseurl=http://mirrors.usc.edu/pub/linux/distributions/centos/4.8/os/$basearch/
gpgcheck=1
#gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos4
gpgkey=http://mirrors.usc.edu/pub/linux/distributions/centos/RPM-GPG-KEY-centos4
priority=1
protect=1
#released updates
[update]
name=CentOS-$releasever - Updates
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates
baseurl=http://mirrors.usc.edu/pub/linux/distributions/centos/4.8/updates/$basearch/
gpgcheck=1
gpgkey=http://mirrors.usc.edu/pub/linux/distributions/centos/RPM-GPG-KEY-centos4
priority=1
protect=1
#packages used/produced in the build but not released
[addons]
name=CentOS-$releasever - Addons
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=addons
baseurl=http://mirrors.usc.edu/pub/linux/distributions/centos/4.8/addons/$basearch/
gpgcheck=1
gpgkey=http://mirrors.usc.edu/pub/linux/distributions/centos/RPM-GPG-KEY-centos4
priority=1
protect=1
#additional packages that may be useful
[extras]
name=CentOS-$releasever - Extras
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras
baseurl=http://mirrors.usc.edu/pub/linux/distributions/centos/4.8/extras/$basearch/
gpgcheck=1
gpgkey=http://mirrors.usc.edu/pub/linux/distributions/centos/RPM-GPG-KEY-centos4
priority=1
protect=1
#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-$releasever - Plus
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus
baseurl=http://mirrors.usc.edu/pub/linux/distributions/centos/4.8/centosplus/$basearch/
gpgcheck=1
enabled=0
gpgkey=http://mirrors.usc.edu/pub/linux/distributions/centos/RPM-GPG-KEY-centos4
priority=2
protect=1
#contrib - packages by Centos Users
[contrib]
name=CentOS-$releasever - Contrib
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=contrib
baseurl=http://mirrors.usc.edu/pub/linux/distributions/centos/4.8/contrib/$basearch/
gpgcheck=1
enabled=0
gpgkey=http://mirrors.usc.edu/pub/linux/distributions/centos/RPM-GPG-KEY-centos4
priority=2
protect=1
接下来,导入key
rpm --import http://mirrors.usc.edu/pub/linux/distributions/centos/RPM-GPG-KEY-CentOS-4
yum upgrade
[root@localhost yum.repos.d]# yum upgrade
base 100% |=========================| 1.1 kB 00:00
primary.xml.gz 100% |=========================| 856 kB 00:07
base : ################################################## 2458/2458
updates 100% |=========================| 951 B 00:00
primary.xml.gz 100% |=========================| 129 kB 00:02
updates : ################################################## 324/324
addons 100% |=========================| 951 B 00:00
primary.xml.gz 100% |=========================| 157 B 00:00
extras 100% |=========================| 1.1 kB 00:00
primary.xml.gz 100% |=========================| 74 kB 00:02
extras : ################################################## 244/244
yum update
OK,到此为止,大功告成!!!!!!!!