查看当前系统版本号
[[email protected] ~]# less /etc/redhat-release
检查系统已安装的组件包中是否已存在Redhat的自带的yum系列组件包
[[email protected] ~]# 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
如果存在请逐一全部删除
[[email protected] ~]# 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系列组件包
[[email protected] ~]# mkdir webuser
[[email protected] ~]# cd webuser
[[email protected] webuser]# wget http://ftp.sjtu.edu.cn/centos/5/os/i386/CentOS/yum-3.2.22-26.el5.centos.noarch.rpm
[[email protected] webuser]# wget http://ftp.sjtu.edu.cn/centos/5/os/i386/CentOS/yum-fastestmirror-1.1.16-14.el5.centos.1.noarch.rpm
[[email protected] webuser]# wget http://ftp.sjtu.edu.cn/centos/5/os/i386/CentOS/yum-metadata-parser-1.1.2-3.el5.centos.i386.rpm
[[email protected] webuser]# wget http://ftp.sjtu.edu.cn/centos/5/os/i386/CentOS/yum-updatesd-0.9-2.el5.noarch.rpm
[[email protected] webuser]# wget http://ftp.sjtu.edu.cn/centos/5/os/i386/CentOS/python-iniparse-0.2.3-4.el5.noarch.rpm
[[email protected] webuser]# wget http://ftp.sjtu.edu.cn/centos/RPM-GPG-KEY-CentOS-5
安装Centos升级组件包
[[email protected] 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升级组件授权
[[email protected] webuser]# rpm -import RPM-GPG-KEY-CentOS-5
创建并编辑yum升级源配置文件
[[email protected] webuser]# mkdir -p /etc/yum.repos.d/
[[email protected] webuser]# vi /etc/yum.repos.d/CentOS-Base.repo
安装图形化的升级软件
[[email protected] webuser]# yum install yumex