一.安装yum软件:
下载以下软件,并安装:
centos-yumconf_4-4.3_noarch.rpm
python-sqlite_1.1.6-1_i386.rpm
python-urlgrabber_2.9.6-2_noarch.rpm
sqlite_3.2.2-1_i386.rpm
yum_2.4.0-1.centos4_noarch.rpm
 
二.修改升级地址:
vi /etc/yum.conf
添加如下内容:
[base]
name=CentOS 5.4 for RHEL4U4 - Base
baseurl=http://centos.ustc.edu.cn/centos/5.4/os/i386/
gpgcheck=1
gpgkey=http://centos.ustc.edu.cn/centos/RPM-GPG-KEY-CentOS-5
[update]
name=CentOS 5.4 for RHEL4U4 - Updates
baseurl=http://centos.ustc.edu.cn/centos/5.4/updates/i386/
gpgcheck=1
gpgkey=http://centos.ustc.edu.cn/centos/RPM-GPG-KEY-CentOS-5
[contrib]
name=CentOS 5.4 for RHEL4U4 - Contrib
baseurl=http://centos.ustc.edu.cn/centos/5.4/contrib/i386/
gpgcheck=1
enabled=1
gpgkey=http://centos.ustc.edu.cn/centos/RPM-GPG-KEY-CentOS-5
 
接着就可以用yum了,也可以升级下你的系统,yum update.