yum安装提示“This system is not registered with RHN

分类:CentOS运维 阅读:77400 次

使用yum安装软件的时候提示“This system is not registered with RHN”,这是因为在装操作系统的时候没有输入注册码。我搜集整理了一些网上的资料说一下如何改用CentOS的yum软件来升级未注册的RHEL系统:


首先 rpm -qa|grep yum 查看 yum 服务相关的包


# rpm -qa|grep yum


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


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 linuxtone.org/soft/lemp/CentOS-Base.repo">http://docs.linuxtone.org/soft/lemp/CentOS-Base.repo (下载CentOS的repo包)


# yum makecache


等待 yum 库更新完毕,就可以 yum 安装软件了

*************************************


yum-metadata-parser-1.1.2-4.el5.x86_64.rpm


wget http://centos.ustc.edu.cn/centos/5/os/x86_64/CentOS/yum-metadata-parser-1.1.2-4.el5.x86_64.rpm


********************************

yum-3.2.22-40.el5.centos.noarch.rpm


wget http://centos.ustc.edu.cn/centos/5/os/x86_64/CentOS/yum-3.2.40.el5.centos.noarch.rpm



<-------END------>