RHEL下yum更新出现This system is not registered with RHN解决办法
说一下如何改用CentOS的yum软件来升级未注册的RHEL系统:
首先 rpm -qa|grep yum 查看 yum 服务相关的包
# rpm -qa|grep yum www.2cto.com
yum-security-1.1.16-13.el5_4.1
yum-3.2.22-33.el5
yum-updatesd-0.9-2.el5
yum-metadata-parser-1.1.2-3.el5
# rpm -qa|grep yum|xargs rpm -e --nodeps
强制删除这一些包
下载CentOS yum 服务相关的 rpm 包
wget http://centos.ustc.edu.cn/centos/5/os/x86_64/CentOS/yum-3.2.22-39.el5.centos.noarch.rpm
wget http://centos.ustc.edu.cn/centos/5/os/x86_64/CentOS/yum-fastestmirror-1.1.16-21.el5.centos.noarch.rpm
wget http://centos.ustc.edu.cn/centos/5/os/x86_64/CentOS/yum-metadata-parser-1.1.2-3.el5.centos.x86_64.rpm
# rpm -ivh yum-*
warning: yum-3.2.22-39.el5.centos.noarch.rpm: Header V3 DSA signature: NOKEY, key ID e8562897 www.2cto.com
Preparing... ########################################### [100%]
1:yum-metadata-parser ########################################### [ 33%]
2:yum-fastestmirror ########################################### [ 67%]
3:yum ########################################### [100%]
哦了,安装完毕,现在进入系统的yum目录
# cd /etc/yum.repos.d/
# mv rhel-debuginfo.repo rhel-debuginfo.repo.bakup
# mv rhel-source.repo rhel-source.repo.bakup
# wget http://docs.linuxtone.org/soft/lemp/CentOS-Base.repo (下载CentOS的repo包)
# yum makecache
等待 yum 库更新完毕,就可以 yum 安装软件了