您的位置:首页 > 运维架构 > Linux

Red Hat 更新yum源为centos,并安装c环境

2013-08-03 11:33 363 查看

系统环境

# 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
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: