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

系统环境

#head-n1/etc/issue
RedHatEnterpriseLinuxServerrelease5.5(Tikanga)

使用redhat系统在线安装时提示ThissystemisnotregisteredwithRHN.如下:

yuminstallgcc
Loadedplugins:rhnplugin,security
ThissystemisnotregisteredwithRHN.
RHNsupportwillbedisabled.
SettingupInstallProcess
Nopackagehttpdavailable.
Nothingtodo

解决方案:

1.卸载redhat自带的yum组件

rpm-qa|grepyum|xargsrpm-e--nodeps

2.安装centos的yum包

cd/etc/yum.repos.d/

32bit

wgethttp://centos.ustc.edu.cn/centos/5/os/i386/CentOS/yum-3.2.22-40.el5.centos.noarch.rpm
wgethttp://centos.ustc.edu.cn/centos/5/os/i386/CentOS/yum-fastestmirror-1.1.16-21.el5.centos.noarch.rpm
wgethttp://centos.ustc.edu.cn/centos/5/os/i386/CentOS/yum-metadata-parser-1.1.2-4.el5.i386.rpm

64bit

wgethttp://centos.ustc.edu.cn/centos/5/os/x86_64/CentOS/yum-metadata-parser-1.1.2-4.el5.x86_64.rpm
wgethttp://centos.ustc.edu.cn/centos/5/os/x86_64/CentOS/yum-fastestmirror-1.1.16-21.el5.centos.noarch.rpm
wgethttp://centos.ustc.edu.cn/centos/5/os/x86_64/CentOS/yum-3.2.22-40.el5.centos.noarch.rpm

rpm-ivh*.rpm

3.下载更新源,并存放在系统目录中

wgethttp://docs.linuxtone.org/soft/lemp/CentOS-Base.repo

4.生成缓存并进行安装

yummakecache

yuminstallgccgcc-c++kernel-devel

你可能感兴趣的:(更新,centos,red,yum源,hat)