最近博主在学习Linux,菜鸟级别的的选手连装个Chrome都觉得难,悲了个催的……百度了很多教程,大多是类似的。博主的配置是在VM8下搭建的RHEL5.3 (Tikanga)版本,不知道什么原因,每次在输入yum install google-chrome-stable之后就会出现“This system is not registered with RHN”的错误提示,蛋疼不已。百度无果后,GG大神帮上忙了(搜索Redhat This system is not registered with RHN,会冒出很多国外大牛的文章)。出现这个错误的原因是你的Linux木有花钱在红帽网络上注册^^,所以无法下载谷歌Chrome的软件包,解决方案可以使用从Redhat演化而来的免费Linux版本CentOS,通过CentOS的yum更新源来实现RHEL5的YUM功能。下面博主结合GG到的国外文章谈谈How to Install CentOS YUM on Redhat Linux RHEL5,以此来解决This system is not registered with RHN的问题。

1 check what yum package installed

查看RHEL是否安装了yum,若是安装了,那么又有哪些yum包:

[root@localhost ~]# rpm -qa |grep yum

yum-metadata-parser-1.0-8.fc6

yum-3.0.1-5.el5

yum-rhn-plugin-0.4.3-1.el5

yum-updatesd-3.0.1-5.el5

2 remove all installed yum packages

卸载上面显示的所有yum包:

[root@localhost ~]# rpm -qa|grep yum|xargs rpm -e --nodeps(不检查依赖,直接删除rpm包)

再用

[root@localhost ~]# rpm -qa |grep yum

[root@localhost ~]#

查看,无信息显示表示已经卸载完成。

3 download the centos packages from website

下载 CentOS YUM包,首先我们需要找到CentOS YUM的更新源,推荐的有(前三个适用于Redhat Linux5版本,最后一个适用于RHEL6的64位版本,当然不管是RHEL5还是RHEL6等等都可以从下面四个镜像网站中下载):

1.国外镜像源http://ftp.heanet.ie/pub/centos/5/os/i386/CentOS/

2.中国科技大学http://centos.ustc.edu.cn/centos/5/os/i386/CentOS/

3.网易开源镜像http://mirrors.163.com/centos/5/os/i386/CentOS/

4.搜狐开源镜像http://mirrors.ustc.edu.cn/centos/6/os/x86_64/Packages/

接着我们就需要在终端里面输入以下命令进行下载(以博主的RHEL5.3为例,从中国科大下载镜像,下载的目录如果没设置的话就会默认是[root@localhost ~]# pwd显示的路径)

[root@localhost ~]# wget http://centos.ustc.edu.cn/centos/5/os/i386/CentOS/yum-fastestmirror-1.1.16-21.el5.centos.noarch.rpm

[root@localhost ~]# wget http://centos.ustc.edu.cn/centos/5/os/i386/CentOS/yum-metadata-parser-1.1.2-4.el5.i386.rpm

[root@localhost ~]# wget http://centos.ustc.edu.cn/centos/5/os/i386/CentOS/yum-3.2.22-40.el5.centos.noarch.rpm

[root@localhost ~]# wget http://centos.ustc.edu.cn/centos/5/os/i386/CentOS/python-iniparse-0.2.3-6.el5.noarch.rpm

如果是Redhat 64位系统,按如下进行下载:

[root@localhost ~]# wget http://centos.ustc.edu.cn/centos/5/os/x86_64/CentOS/yum-fastestmirror-1.1.16-21.el5.centos.noarch.rpm

[root@localhost ~]# wget http://centos.ustc.edu.cn/centos/5/os/x86_64/CentOS/yum-metadata-parser-1.1.2-4.el5.x86_64.rpm

4 安装这所下载的四个包

注意:单个的安装包可能会依赖其它包(例如yum和yum-fastestmirror会相互依赖),所以我们可以把所有这些包放在一起,用一行命令将它们同时安装即可:

[root@localhost ~]# rpm -ivh yum-fastestmirror-1.1.16-21.el5.centos.noarch.rpm yum-metadata-parser-1.1.2-4.el5.i386.rpm yum-3.2.22-40.el5.centos.noarch.rpm

对应Redhat 64位系统的操作如下:

[root@localhost ~]# rpm -ivh yum-fastestmirror-1.1.16-21.el5.centos.noarch.rpm yum-metadata-parser-1.1.2-4.el5.x86_64.rpm yum-3.2.22-40.el5.centos.noarch.rpm

5 download configure file

下载CentOS-Base.repo到/etc/yum.repos.d/文件夹里: [root@localhost ~]# wget http://docs.linuxtone.org/soft/lemp/CentOS-Base.repo

-O /etc/yum.repos.d/CentOS-Base.repo

[root@localhost ~]# wget http://huangkeye-blog.googlecode.com/files/CentOS-Base.repo

-O /etc/yum.repos.d/CentOS-Base.repo(以上这两个适用于RHEL版本5)

[root@localhost ~]# wget http://my-project-huangkeye.googlecode.com/files/CentOS-Base.repo

-O /etc/yum.repos.d/CentOS-Base.repo(这个适用于RHEL版本6) 也可以直接进入vim修改该文件为以下内容:

[base]

name=CentOS-5 - Base

baseurl=http://centos.ustc.edu.cn/centos/5/os/$basearch/

gpgcheck=1

gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5

#released updates

[update]

name=CentOS-5 - Updates

baseurl=http://centos.ustc.edu.cn/centos/5/updates/$basearch/

gpgcheck=1

gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5

#packages used/produced in the build but not released

[addons]

name=CentOS-5 - Addons

baseurl=http://centos.ustc.edu.cn/centos/5/addons/$basearch/

gpgcheck=1

gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5

#additional packages that may be useful

[extras]

也可以直接进入vim修改该文件为以下内容:

[base]

name=CentOS-5 - Base

baseurl=http://centos.ustc.edu.cn/centos/5/os/$basearch/

gpgcheck=1

gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5

#released updates

[update]

name=CentOS-5 - Updates

baseurl=http://centos.ustc.edu.cn/centos/5/updates/$basearch/

gpgcheck=1

gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5

#packages used/produced in the build but not released

[addons]

name=CentOS-5 - Addons

baseurl=http://centos.ustc.edu.cn/centos/5/addons/$basearch/

gpgcheck=1

gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5

#additional packages that may be useful

[extras]

gpgcheck=1

enabled=0

gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5

#packages in testing

[testing]

name=CentOS-5 - Testing

baseurl=http://centos.ustc.edu.cn/centos/5/testing/$basearch/

gpgcheck=1

enabled=0

gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5

6 [选做]clear cache and rebuild

需要清除和重建cache:

[root@localhost ~]# yum clean metadata

Loaded plugins: fastestmirror

0 metadata files removed

0 sqlite files removed

0 metadata files removed

[root@localhost ~]# yum clean dbcache

Loaded plugins: fastestmirror

0 sqlite files removed

[root@localhost ~]# yum makecache

Loaded plugins: fastestmirror

Determining fastest mirrors

addons                                                                                                         | 1.9 kB     00:00

addons/filelists_db                                                                                            |  568 B     00:00     addons/other_db                                                                                                |  546 B     00:00

addons/primary_db                                                                                              | 1.1 kB     00:00

base                                                                                                           | 1.1 kB     00:00

base/filelists                                                                                                 | 3.6 MB     00:03     base/other                                                                                                     |  13 MB     00:13

base/group                                                                                                     | 1.1 MB     00:02

base/primary                                                                                                   | 1.2 MB     00:01

extras                                                                                                         | 2.1 kB     00:00

extras/filelists_db                                                                                            | 241 kB     00:00

extras/other_db                                                                                                | 406 kB     00:00

extras/group                                                                                                   | 9.7 kB     00:00

extras/primary_db                                                                                              | 188 kB     00:00

update                                                                                                         | 1.9 kB     00:00     update/filelists_db                                                                                            | 3.1 MB     00:03

update/other_db                                                                                                |  15 MB     00:15

update/primary_db                                                                                              | 634 kB     00:00

base                                                                                                                        3641/3641

base                                                                                                                        3641/3641

base                                                                                                                        3641/3641

Metadata Cache Created

[root@localhost ~]#

7 installation has been completed, testing

//安装成功,开始测试:

[root@localhost ~]# yum update

出处:http://www.seacha.com/article.php/knowledge/linux/linuxbase/2013/0925/2216.html

解决Redhat yum出现This system is not registered with RHN的方案的更多相关文章

  1. 64位RHEL5系统上运行yum出现"This system is not registered with RHN”的解决方法

    在红帽EL5上运行yum,提示“This system is not registered with RHN”,意思是没有在官网上注册,不能下载RH的软件包,替代方案是采用centos源. 1.卸载r ...

  2. yum提示This system is not registered with RHN.RHN support will be disabled.

    [root@cactiez ~]# yum install mlocateLoading "security" pluginLoading "rhnplugin" ...

  3. Red Hat Enterprise Linux Server(RHEL) yum安装软件时This system is not registered with RHN. RHN support will be disabled. 的解决方法(转)

    新安装了redhat6.5.安装后,登录系统,使用yum update 更新系统.提示: This system is not registered to Red Hat Subscription M ...

  4. 如何解决 yum安装出现This system is not registered with RHN

    [root@localhost ~]# yum install libtool Loaded plugins: rhnplugin, security This system is not regis ...

  5. This system is not registered with RHN解决方法

    root@localhost ipvsadm-1.25]# yum install gcc Loading "security" plugin Loading "rhnp ...

  6. This system is not registered with RHN

    在红帽EL5上运行yum,提示“This system is not registered with RHN”,意思是没有在官网上注册,不能下载RH的软件包,替代方案是采用centos源. 1.卸载r ...

  7. 解决This system is not registered with RHN

    Redhat之所以会出现这个错误是因为没有注册RHN,我们只需要更新一下yum的源就可以了.使用命令 cd /etc/yum.repos.d/   进入yum的配置目录. 在终端中输入 wget ht ...

  8. 如何解决This system is not registered with RHN.

    今天我必须写下这篇文章,由于在我刚刚接触到Linux下安装oracle时碰到了Linux中少xscreensaver.rpm包自己弄了非常久.最后还是被一个大哥帮我攻克了:仅仅能说非常的感谢你! 我试 ...

  9. 红帽中出现”This system is not registered with RHN”的解决方案

    原因是你的linux没有在红帽网络上注册,所以无法下载上面的软件包,替代方案可以使用centos. 下面介绍下使用centos 的流程 1.卸载rhel的默认安装的yum包查看yum包rpm -qa| ...

随机推荐

  1. box-shadow 制作单边阴影效果,不影响其它边的效果

    box-shadow 制作单边阴影效果,不影响其它边的效果:  https://blog.csdn.net/u010289111/article/details/53171128 CSS 样式实现单边 ...

  2. PHP 实现小偷程序

    为什么使用“小偷程序”? 远程抓取文章资讯或商品信息是很多企业要求程序员实现的功能,也就是俗说的小偷程序.其最主要的优点是:解决了公司网编繁重的工作,大大提高了效率.只需要一运行就能快速的抓取别人网站 ...

  3. How To Release and/or Renew IP Addresses on Windows XP | 2000 | NT

    Type 'ipconfig' (without the quotes) to view the status of the computer's IP address(es). If the com ...

  4. A - Max Sum Plus Plus (好题&&dp)

    A - Max Sum Plus Plus  I think you have got an AC in Ignatius.L's "Max Sum" problem. To be ...

  5. 在centos上安装nodejs

    之前在百度云上买了个服务器,选择的centos 64位系统. 买完之后一顿折腾,今天就来讲讲怎么安装node和npm,刚开始在Google上找了好多方法,都是费时.费力,最后还是没有安装成功,下面将介 ...

  6. 如何多个router 进行合并?

    有时间可能有多个人开发,如果在共用router, 势必会造成合并冲突,可以分开多个router.js ,然后进行合并 // router0.jsconst studyRouter = [ { path ...

  7. 【笔记目录2】【jessetalk 】ASP.NET Core快速入门_学习笔记汇总

    当前标签: ASP.NET Core快速入门 共2页: 上一页 1 2  任务27:Middleware管道介绍 GASA 2019-02-12 20:07 阅读:15 评论:0 任务26:dotne ...

  8. split slice splice的简单区别

    split slice splice的简单区别 split: 分割 //字符串方法 string.split let str = 'hello world'; //str.split('') 以什么东 ...

  9. Linux xargs 命令

    xargs xargs 是给命令传递参数的一个过滤器,也是组合多个命令的一个工具. xargs 可以将管道或标准输入(stdin)数据转换成命令行参数,也能够从文件的输出中读取数据. xargs 也可 ...

  10. 力扣——3sum closest(最接近的三数之和)python 实现

    题目描述: 中文: 给定一个包括 n 个整数的数组 nums 和 一个目标值 target.找出 nums 中的三个整数,使得它们的和与 target 最接近.返回这三个数的和.假定每组输入只存在唯一 ...