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 (阅读:5668)
- Yum 下载缓慢? (阅读:3003)
- web业务尽快升级到centos 6.4的理由 (阅读:3006)
- 查看CentOS版本的方法 (阅读:2711)
- Redhat 使用Yum安装、更新rpm包 (阅读:2575)
- CentOS分区规律大总结 (阅读:2555)
- CentOS上搭建Git服务器 (阅读:2331)
- 在Centos(RHEL)上安装和配置MRTG (阅读:2002)
- 解决CentOS的Missing Dependency: bind问题 (阅读:1960)
- 使用reposync同步yum源 (阅读:1550)
扫一扫订阅我的微信号:IT技术博客大学习
- 作者:yoyo 来源: YOYO'S BLOG
- 标签: CentOS yum
- 发布时间:2010-04-28 15:26:53
- [71] Twitter/微博客的学习摘要
- [66] IOS安全–浅谈关于IOS加固的几种方法
- [65] find命令的一点注意事项
- [64] android 开发入门
- [63] 如何拿下简短的域名
- [63] Go Reflect 性能
- [61] Oracle MTS模式下 进程地址与会话信
- [61] 流程管理与用户研究
- [58] 图书馆的世界纪录
- [58] 读书笔记-壹百度:百度十年千倍的29条法则