本文主要是介绍给RedHat机器配置CentOS的Repository,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
前言:
当我们安装了RedHat 的机器时,如果不到RedHat网站注册,会导致不能安装其网站上所 host的软件。而CentOS作为Redhat的社区版,与对应版本的RedHat完全兼容(其发行的Binary就是从RedHat编译而来),因此我们可以考虑将RedHat机器的Repository替换为CentOS的Repository
现象: 当用 yum install $softwarePackage时,报如下错误:
This system is not registered with RHN.
RHN support will be disabled.
1.1 编辑 rhnplugin.conf ( vi /etc/yum/pluginconf.d/rhnplugin.conf ) ,使它具有如下内容:
[main]
enabled = 0
gpgcheck = 0[rhel-i386-server-5]
enabled = 0
#[some-unsigned-custom-channel]
#gpgcheck = 0
1.2 创建/编辑 centOS的repo
解决方案1-使用heanet:
编辑centos.repo [位于/etc/yum.repos.d] (vi /etc/yum.repos.d/centos.repo)
这篇关于给RedHat机器配置CentOS的Repository的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!