使用redhat 系统在线安装时提示This system is not registered with RHN. 那是因为你使用的红帽操作系统没有订阅。如果要使用yum来安装系统的依赖包,就得将RHEL的yum源换成centos
1.卸载rhel的yum相关的包
rpm -qa|grep yum|xargs rpm -e --nodeps
2.安装centos的源
wget http://mirrors.163.com/.help/CentOS5-Base-163.repo # 针对RHEL 5系列
wget http://mirrors.163.com/.help/CentOS6-Base-163.repo # 针对RHEL 6系列
将下载的repo文件复制到/etc/yum.repo.d/,并重名为CentOS-Base.repo。
打开CentOS-Base.repo, 将$releaserver 为5(针对RHEL 5系列)或6(针对RHEL 6系列)
3.安装centos的yum包
从http://vault.centos.org/ 下载 yum, yum-security, yum-fastestmirror, yum-metadata-parser的RPM包,下载后使用rpm -ivh yum-*.rpm安装
最后yum makecache
现在你可以使用centos的yum源了