redhat yum ”This system is not registered with RHN” 解决 更换CentOS源 亲测

转自 http://hi.baidu.com/%B7%E3%D3%A1_/blog/item/74a474218b8ecf1f908f9d5d.html

redhat 5.5 

yum 没有服务提示如下:

Loaded plugins: rhnplugin, security
This system is not registered with RHN.
RHN support will be disabled.
Setting up Install Process
No package httpd available.
Nothing to do


1 卸载自带的YUM

#rpm -qa|grep yum
#rpm -qa|grep yum|xargs rpm -e --nodeps

2.安装centos的yum包

#wget  http://mirrors.163.com/centos/5/os/x86_64/CentOS/yum-3.2.22-39.el5.centos.noarch.rpm
#wget  http://mirrors.163.com/centos/5/os/x86_64/CentOS/yum-fastestmirror-1.1.16-21.el5.centos.noarch.rpm
#wget http://mirrors.163.com/centos/5/os/x86_64/CentOS/yum-metadata-parser-1.1.2-3.el5.centos.x86_64.rpm

#rpm -ivh *.rpm   注意:yum和yum-fastestmirror相互依赖,所以同时安装即可。


3下载更新源,并存放在系统目录中

# wget http://docs.linuxtone.org/soft/lemp/CentOS-Base.repo
# mv CentOS_Base.repo /etc/yum.repos.d/CentOS-Base.repo

4.生成缓存

# yum makecache

错误:
Cannot retrieve repository metadata (repomd.xml) for repository: add
先看DNS是不是好使
#vim /etc/resolv.conf
nameserver 219.141.140.130
nameserver 202.106.0.20


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值