查看当前系统版本号
[root@localhost ~]# less /etc/redhat-release
检查系统已安装的组件包中是否已存在Redhat的自带的yum系列组件包
[root@localhost ~]# rpm -qa | grep yum
yum-metadata-parser-1.0-8.fc6
yum-3.0.1-5.el5
yum-updatesd-3.0.1-5.el5
yum-rhn-plugin-0.4.3-1.el5
如果存在请逐一全部删除
[root@localhost ~]# rpm -e --nodeps yum-metadata-parser-1.0-8.fc6 yum-3.0.1-5.el5 yum-updatesd-3.0.1-5.el5 yum-rhn-plugin-0.4.3-1.el5
建立Centos专用目录,然后下载并安装Centos系统的yum系列组件包
[root@localhost ~]# mkdir webuser
[root@localhost ~]# cd webuser
[root@localhost webuser]# wget http://ftp.sjtu.edu.cn/centos/5/os/i386/CentOS/yum-3.2.22-26.el5.centos.noarch.rpm
[root@localhost webuser]# wget http://ftp.sjtu.edu.cn/centos/5/os/i386/CentOS/yum-fastestmirror-1.1.16-14.el5.centos.1.noarch.rpm
[root@localhost webuser]# wget http://ftp.sjtu.edu.cn/centos/5/os/i386/CentOS/yum-metadata-parser-1.1.2-3.el5.centos.i386.rpm
[root@localhost webuser]# wget http://ftp.sjtu.edu.cn/centos/5/os/i386/CentOS/yum-updatesd-0.9-2.el5.noarch.rpm
[root@localhost webuser]# wget http://ftp.sjtu.edu.cn/centos/5/os/i386/CentOS/python-iniparse-0.2.3-4.el5.noarch.rpm
[root@localhost webuser]# wget http://ftp.sjtu.edu.cn/centos/RPM-GPG-KEY-CentOS-5
安装Centos升级组件包
[root@localhost webuser]# rpm -Uvh --nodeps *.rpm
Preparing... ########################################### [100%]
1:yum-updatesd ########################################### [ 20%]
2:python-iniparse ########################################### [ 40%]
3:yum ########################################### [ 60%]
4:yum-fastestmirror ########################################### [ 80%]
5:yum-metadata-parser ########################################### [100%]
导入Centos升级组件授权
[root@localhost webuser]# rpm -import RPM-GPG-KEY-CentOS-5
创建并编辑yum升级源配置文件
[root@localhost webuser]# mkdir -p /etc/yum.repos.d/
[root@localhost webuser]# vi /etc/yum.repos.d/CentOS-Base.repo
安装图形化的升级软件
[root@localhost webuser]# yum install yumex
本文出自 “梦女孩” 博客,谢绝转载!
原文地址:http://dreamgirl1314.blog.51cto.com/1159474/1606097