技术头条 - 一个快速在微博传播文章的方式     搜索本站
您现在的位置首页 --> 系统运维 --> CentOS 5上安装yum

CentOS 5上安装yum

浏览:2289次  出处信息

    用过CentOS的人肯定有点不解,CentOS上自带yum,为啥还要安装?因为很多系统上并不一定安装了yum,尤其是vps上,我给客户的vps就经常没有yum,所以对于已经依赖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

    有些时候单纯的某一种方法并不能安装好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

建议继续学习:

  1. Centos yum 安装nginx+PHP-FPM+eAccelerator+mysql    (阅读:5596)
  2. Yum 下载缓慢?    (阅读:2982)
  3. web业务尽快升级到centos 6.4的理由    (阅读:2865)
  4. 查看CentOS版本的方法    (阅读:2637)
  5. Redhat 使用Yum安装、更新rpm包    (阅读:2557)
  6. CentOS分区规律大总结    (阅读:2489)
  7. CentOS上搭建Git服务器    (阅读:2215)
  8. 在Centos(RHEL)上安装和配置MRTG    (阅读:1987)
  9. 解决CentOS的Missing Dependency: bind问题    (阅读:1939)
  10. 使用reposync同步yum源    (阅读:1477)
QQ技术交流群:445447336,欢迎加入!
扫一扫订阅我的微信号:IT技术博客大学习
© 2009 - 2024 by blogread.cn 微博:@IT技术博客大学习

京ICP备15002552号-1