RHEL提示RHN没有注册问题的解决方法

1、系统RHEL5.5,初次使用yum时出现以下问题:

[root@localhost real]# yum update
Loaded plugins: rhnplugin, security
This system is not registered with RHN.
RHN support will be disabled.
Setting up Update Process
No Packages marked for Update

问题原因:红帽没有注册RHN。

解决办法之一(也有见到其他方法,但是这种比较简单):(假定你已安装yum,且网络畅通)更改yum的源,即更换/etc/yum.repos.d /rhel-debuginfo.repo 这个文件。

进入/etc/yum.repos.d/目录,终端中输入

# wget http://docs.linuxtone.org/soft/lemp/CentOS-Base.repo

即可在此目录下得到CentOS- Base.repo文件,这是centos的源文件,只需将其重命名为rhel-debuginfo.repo即可,以前的文件做个备份

具体操作过程:

[root@localhost real]# cp /etc/yum.repos.d/rhel-debuginfo.repo /home/real/Desktop/   备份原文件
[root@localhost real]# cd /etc/yum.repos.d/
[root@localhost yum.repos.d]# ls
rhel-debuginfo.repo
[root@localhost yum.repos.d]# wget http://docs.linuxtone.org/soft/lemp/CentOS-Base.repo
。。。。。
[root@localhost yum.repos.d]# ls
CentOS-Base.repo  rhel-debuginfo.repo
[root@localhost yum.repos.d]# rm rhel-debuginfo.repo      删除原来的yum源配置文件
rm: remove regular file `rhel-debuginfo.repo'? y
[root@localhost yum.repos.d]# mv CentOS-Base.repo rhel-debuginfo.repo   将下载的CentOS的配置文件更改为real源的名字
[root@localhost yum.repos.d]# ls
rhel-debuginfo.repo
View Code

这样就能用了:

[root@localhost yum.repos.d]# yum update
Loaded plugins: rhnplugin, security
This system is not registered with RHN.
RHN support will be disabled.
addons                                               | 1.9 kB     00:00     
addons/primary_db                                    | 1.1 kB     00:00     
base                                                 | 1.1 kB     00:00     
base/primary                                         | 1.3 MB     00:01     
base                                                              3667/3667
extras                                               | 2.1 kB     00:00     
extras/primary_db                                    | 173 kB     00:00     
update                                               | 1.9 kB     00:00     
update/primary_db                                    | 322 kB     00:00     
Skipping security plugin, no data
Setting up Update Process
Resolving Dependencies
Skipping security plugin, no data
--> Running transaction check
---> Package Deployment_Guide-en-US.noarch 0:5.8-1.el5.centos set to be updated
---> Package NetworkManager.i386 1:0.7.0-13.el5 set to be updated
View Code

2、去掉RHN(参考:http://blog.chinaunix.net/zt/1049/rhel_1049513.shtml

rpm -qa | grep subscription-manager
yum remove这些包
rpm -qa | grep rhn
yum remove这些包
原文地址:https://www.cnblogs.com/chinas/p/4394262.html