問題:紅帽中出現This system is not registered with RHN這個的原因是因為紅帽中沒有註冊RHN。
解決辦法一:
(假定你已安裝yum,且網路暢通)更改yum的源,即更換/etc/yum.repos.d/rhel-debuginfo.repo 這個檔案。
進入/etc/yum.repos.d/目錄,終端中輸入wget http://docs.linuxtone.org/soft/lemp/CentOS-Base.repo即可在此目錄下得到CentOS-Base.repo檔案,這是centos的源檔案,只需將其重新命名為rhel-debuginfo.repo即可,以前的檔案做個備份。
解決辦法二:
1.卸載redhat內建的yum組件
[root@localhost ~]# rpm -qa|grep yum|xargs rpm -e --nodeps
2.安裝centos的yum包
32位
# wget http://centos.ustc.edu.cn/centos/5/os/i386/CentOS/yum-metadata-parser-1.1.2-3.el5.centos.i386.rpm
# wget http://centos.ustc.edu.cn/centos/5/os/i386/CentOS/yum-fastestmirror-1.1.16-16.el5.centos.noarch.rpm
# wget http://centos.ustc.edu.cn/centos/5/os/i386/CentOS/yum-3.2.22-37.el5.centos.noarch.rpm
64位
# wget http://centos.ustc.edu.cn/centos/5/os/x86_64/CentOS/yum-metadata-parser-1.1.2-3.el5.centos.x86_64.rpm
# wget http://centos.ustc.edu.cn/centos/5/os/x86_64/CentOS/yum-fastestmirror-1.1.16-21.el5.centos.noarch.rpm
# wget http://centos.ustc.edu.cn/centos/5/os/x86_64/CentOS/yum-3.2.22-39.el5.centos.noarch.rpm
[root@localhost ~]# rpm -ivh *.rpm
3. 下載更新源,並存放在系統目錄中 [root@localhost ~]# wget http://docs.linuxtone.org/soft/lemp/CentOS-Base.repo
[root@localhost ~]#mv CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo
4.產生緩衝
[root@localhost ~]# yum makecache