CentOS 5 上安装yum的方法
一、下载yum的rpm包直接安装
http://centos.ustc.edu.cn/centos/5.4/os/i386/centos/yum-3.2.22-20.el5.centos.noarch.rpm
http://centos.ustc.edu.cn/centos/5.4/os/i386/centos/yum-fastestmirror-1.1.16-13.el5.centos.noarch.rpm
下载到某个目录之后,执行下面的命令
rpm -ivh yum*.rpm
如果提示缺少什么文件的话,请看第二种方法。
二、通过rpm包来安装
依次执行下面的命令:
rpm -uvh http://mirror.centos.org/centos-5/5/os/i386/centos/elfutils-libs-0.137-3.el5.i386.rpm
rpm -uvh http://mirror.centos.org/centos-5/5/os/i386/centos/gmp-4.1.4-10.el5.i386.rpm
rpm -uvh http://mirror.centos.org/centos-5/5/os/i386/centos/readline-5.1-3.el5.i386.rpm
rpm -uvh http://mirror.centos.org/centos-5/5/os/i386/centos/python-2.4.3-27.el5.i386.rpm
rpm -uvh http://mirror.centos.org/centos-5/5/os/i386/centos/python-iniparse-0.2.3-4.el5.noarch.rpm
rpm -uvh http://mirror.centos.org/centos-5/5/os/i386/centos/libxml2-2.6.26-2.1.2.8.i386.rpm
rpm -uvh http://mirror.centos.org/centos-5/5/os/i386/centos/libxml2-python-2.6.26-2.1.2.8.i386.rpm
rpm -uvh http://mirror.centos.org/centos-5/5/os/i386/centos/expat-1.95.8-8.2.1.i386.rpm
rpm -uvh http://mirror.centos.org/centos-5/5/os/i386/centos/python-elementtree-1.2.6-5.i386.rpm
rpm -uvh http://mirror.centos.org/centos-5/5/os/i386/centos/sqlite-3.3.6-5.i386.rpm
rpm -uvh http://mirror.centos.org/centos-5/5/os/i386/centos/python-sqlite-1.1.7-1.2.1.i386.rpm
rpm -uvh http://mirror.centos.org/centos-5/5/os/i386/centos/elfutils-0.137-3.el5.i386.rpm
rpm -uvh http://mirror.centos.org/centos-5/5/os/i386/centos/rpm-python-4.4.2.3-18.el5.i386.rpm # (1)
rpm -uvh http://mirror.centos.org/centos-5/5/os/i386/centos/m2crypto-0.16-6.el5.6.i386.rpm
rpm -uvh http://mirror.centos.org/centos-5/5/os/i386/centos/python-urlgrabber-3.1.0-5.el5.noarch.rpm
rpm -uvh http://mirror.centos.org/centos-5/5/os/i386/centos/yum-metadata-parser-1.1.2-3.el5.centos.i386.rpm
rpm -uvh http://mirror.centos.org/centos-5/5/os/i386/centos/yum-3.2.22-20.el5.centos.noarch.rpm (2)
rpm -uvh http://mirror.centos.org/centos-5/5/os/i386/centos/yum-fastestmirror-1.1.16-13.el5.centos.noarch.rpm (2)
yum -y update
有些时候单纯的某一种方法并不能安装好yum,那就两者结合起来,一切就ok了。
都是从网上找到的,谢谢高手的资源。http://hi.baidu.com/dyspangzi/blog/item/7a8154a78704c299d143588c.html
http://www.vpsad.com/html/y2010/2126_how-to-install-yum-for-centos.html
下一篇: PHP 定界符 使用技巧
推荐阅读
-
CentOS 7.x安装部署Memcached服务器的详细方法
-
centos查找已安装的jdk路径的方法
-
CentOS6.5服务器环境安装VPN的方法
-
Centos7安装完后无法联网的解决方法
-
CentOS 7.4下安装Oracle 11.2.0.4数据库的方法
-
centos6.5中rpm包安装mysql5.7初始化出错的解决方法
-
centos6.5 lamp 环境(使用yum安装方法)
-
centos6.5中用yum方式安装php5.4与apache2.2的步骤
-
Centos6安装中文字体的方法
-
VirtualBox安装Centos6.8出现E_INVALIDARG(0x80070057)的解决方法