系统环境
# head -n 1 /etc/issue
Red Hat Enterprise Linux Server release 5.5 (Tikanga)
使用redhat 系统在线安装时提示This system is not registered with RHN.如下:
yum install gcc
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.卸载redhat自带的yum组件
rpm -qa|grep yum|xargs rpm -e --nodeps
2.安装centos的yum包
cd /etc/yum.repos.d/
32bit
wget http://centos.ustc.edu.cn/centos/5/os/i386/CentOS/yum-3.2.22-40.el5.centos.noarch.rpm
wget http://centos.ustc.edu.cn/centos/5/os/i386/CentOS/yum-fastestmirror-1.1.16-21.el5.centos.noarch.rpm
wget http://centos.ustc.edu.cn/centos/5/os/i386/CentOS/yum-metadata-parser-1.1.2-4.el5.i386.rpm
64bit
wget http://centos.ustc.edu.cn/centos/5/os/x86_64/CentOS/yum-metadata-parser-1.1.2-4.el5.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-40.el5.centos.noarch.rpm
rpm -ivh *.rpm
3. 下载更新源,并存放在系统目录中
wget http://docs.linuxtone.org/soft/lemp/CentOS-Base.repo
4.生成缓存并进行安装
yum makecache
yum install gcc gcc-c++ kernel-devel