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


你可能感兴趣的:(redhat yum ”This system is not registered with RHN” 解决 更换CentOS源 亲测)