1.在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://docs.linuxtone.org/soft/lemp/CentOS-Base.repo
########################################################################