CentOS 5上安装yum
用过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
建议继续学习:
- Centos yum 安装nginx+PHP-FPM+eAccelerator+mysql (阅读:5615)
- Yum 下载缓慢? (阅读:2992)
- web业务尽快升级到centos 6.4的理由 (阅读:2905)
- 查看CentOS版本的方法 (阅读:2659)
- Redhat 使用Yum安装、更新rpm包 (阅读:2563)
- CentOS分区规律大总结 (阅读:2507)
- CentOS上搭建Git服务器 (阅读:2249)
- 在Centos(RHEL)上安装和配置MRTG (阅读:1992)
- 解决CentOS的Missing Dependency: bind问题 (阅读:1946)
- 使用reposync同步yum源 (阅读:1499)
扫一扫订阅我的微信号:IT技术博客大学习
- 作者:yoyo 来源: YOYO'S BLOG
- 标签: CentOS yum
- 发布时间:2010-04-28 15:26:53
- [44] 如何拿下简短的域名
- [44] IOS安全–浅谈关于IOS加固的几种方法
- [43] Oracle MTS模式下 进程地址与会话信
- [43] 图书馆的世界纪录
- [41] 界面设计速成
- [41] android 开发入门
- [40] 【社会化设计】自我(self)部分――欢迎区
- [38] 读书笔记-壹百度:百度十年千倍的29条法则
- [37] 视觉调整-设计师 vs. 逻辑
- [34] 程序员技术练级攻略