1. 下载 yum安装包:
# wget http://vault.centos.org/4.8/os/i386/CentOS/RPMS/yum-2.4.3-4.el4.centos.noarch.rpm
# wget http://vault.centos.org/4.8/os/i386/CentOS/RPMS/yum-metadata-parser-1.0-8.el4.centos.i386.rpm
# wget http://vault.centos.org/4.8/os/i386/CentOS/RPMS/python-elementtree-1.2.6-5.el4.centos.i386.rpm
# wget http://vault.centos.org/4.8/os/i386/CentOS/RPMS/python-sqlite-1.1.7-1.2.1.i386.rpm
# wget http://vault.centos.org/4.8/os/i386/CentOS/RPMS/python-urlgrabber-2.9.8-2.noarch.rpm
# wget http://vault.centos.org/4.8/os/i386/CentOS/RPMS/sqlite-3.3.6-2.i386.rpm
# wget http://www.eomy.net/linux/install-yum/centos-yumconf-4-4.5.noarch.rpm
2. 安装rpm包:
# rpm -ivh yum-2.4.3-4.el4.centos.noarch.rpm
warning: yum-2.4.3-4.el4.centos.noarch.rpm: V3 DSA signature: NOKEY, key ID 443e1821
error: Failed dependencies:
yum-metadata-parser is needed by yum-2.4.3-4.el4.centos.noarch
yumconf is needed by yum-2.4.3-4.el4.centos.noarch
# rpm -ivh yum-metadata-parser-1.0-8.el4.centos.i386.rpm
warning: yum-metadata-parser-1.0-8.el4.centos.i386.rpm: V3 DSA signature: NOKEY, key ID 443e1821
error: Failed dependencies:
libsqlite3.so.0 is needed by yum-metadata-parser-1.0-8.el4.centos.i386
# rpm -ivh sqlite-3.3.6-2.i386.rpm
warning: sqlite-3.3.6-2.i386.rpm: V3 DSA signature: NOKEY, key ID 443e1821
Preparing... ########################################### [100%]
1:sqlite ########################################### [100%]
# rpm -ivh yum-metadata-parser-1.0-8.el4.centos.i386.rpm
warning: yum-metadata-parser-1.0-8.el4.centos.i386.rpm: V3 DSA signature: NOKEY, key ID 443e1821
Preparing... ########################################### [100%]
1:yum-metadata-parser ########################################### [100%]
# rpm -ivh centos-yumconf-4-4.5.noarch.rpm
warning: centos-yumconf-4-4.5.noarch.rpm: V3 DSA signature: NOKEY, key ID 443e1821
Preparing... ########################################### [100%]
1:centos-yumconf ########################################### [100%]
以下rpm包也需要安装:
# rpm -ivh python-elementtree-1.2.6-5.el4.centos.i386.rpm
# rpm -ivh python-urlgrabber-2.9.8-2.noarch.rpm
# rpm -ivh python-sqlite-1.1.7-1.2.1.i386.rpm
3. 修改 /etc/yum.conf:
4. # yum clean all
# yum makecache
# yum update
参考:
http://down.chinaz.com/server/201111/1321_1.htm
http://blog.csdn.net/sunboy_2050/article/details/5629370
http://hi.baidu.com/529970816/item/0ea855bb068c2af163388ef7
http://www.eomy.net/linux/install-yum/
https://access.redhat.com/site/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Deployment_Guide/ch-yum.html