RedHat上YUM源之常见问题

字体大小: 中小 标准 ->行高大小: 标准

在RedHat系统上使用yum指令时出现如下问题
“ThesystemisnotregisteredwithRHN”的原因是没有在红帽网络上注册,解决方法改为使用CentOS的yum源
1.查看rhel默认安装的yum包,并卸载

[root@zhu1 ~]# rpm -qa | grep yum
yum-fastestmirror-1.1.16-14.el5.centos.1
yum-updatesd-0.9-2.el5
yum-metadata-parser-1.1.2-3.el5.centos
yum-3.2.22-40.el5.centos
[root@zhu1 ~]# rpm -qa | grep yum |xargs rpm -e --nodeps

2.下载centos的yum包

[root@zhu1 ~]#wget http://centos.ustc.edu.cn/centos/5/os/i386/CentOS/yum-3.2.22-40.el5.centos.noarch.rpm
[root@zhu1 ~]#wget http://centos.ustc.edu.cn/centos/5/os/i386/CentOS/yum-fastestmirror-1.1.16-21.el5.centos.noarch.rpm
[root@zhu1 ~]#wget http://centos.ustc.edu.cn/centos/5/os/i386/CentOS/yum-metadata-parser-1.1.2-4.el5.i386.rpm
#安装
[root@zhu1 ~]# rpm -ivh yum-*

3.下载新的yum源放到/etc/yum.repos.d/目录下

[root@zhu1 ~]# wget http://www.linuxidc.com/files/2011/05/06/CentOS-Base.repo


########################################################################

推荐阅读:

配置EPEL YUM源 http://www.linuxidc.com/Linux/2012-10/71850.htm

Redhat 本地yum源配置 http://www.linuxidc.com/Linux/2012-11/75127.htm

RedHat Linux 本地yum源的配置 http://www.linuxidc.com/Linux/2013-08/88217.htm

RedHat 6.2 Linux修改yum源免费使用CentOS源 http://www.linuxidc.com/Linux/2013-07/87383.htm

更多RedHat相关信息见RedHat 专题页面 http://www.linuxidc.com/topicnews.aspx?tid=10

此文章由 http://www.ositren.com 收集整理 ,地址为: http://www.ositren.com/htmls/62935.html