CentOS 5上如何安装yum

2019-10-25    来源:爱站科技

容器云强势上线!快速搭建集群,上万Linux镜像随意使用

使用过CentOS的用户们应该都知道,在CentOS上是自带yum的,自带yum为什么还要安装呢?其实在很多系统中都不一定安装了yum,因此我们就需要自己动手安装,那么你知道CentOS 5上如何安装yum吗?
?

下面有两种办法可以安装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

上文中就是小编介绍CentOS 5上如何安装yum的方法,有些时候单纯的某一种方法并不能安装好yum,那就就需要两者结合起来,一切就OK了。

标签: CentOS 5 yum

版权申明:本站文章部分自网络,如有侵权,请联系:west999com@outlook.com
特别注意:本站所有转载文章言论不代表本站观点!
本站所提供的图片等素材,版权归原作者所有,如需使用,请与原作者联系。

上一篇:如何将.htaccess绑定域名到子目录

下一篇:.htaccess的使用方法