Add CentOS yum repo in Redhat system

原创 2018年04月15日 18:15:25

Add CentOS yum repo in Redhat system

-v0.1 2018/4/15 Sherlock init

In Redhat system, you should buy it to use. However, CentOS is
free and almost same with related Redhat system. So after we
add the CentOS yum repo, then we can directly use Redhat system.
(If you already have a CentOS, please use it directly)

We can add the repo configuration file in /etc/yum.repos.d/ like:

# CentOS-Base.repo
#
# The mirror system uses the connecting IP address of the client and the
# update status of each mirror to pick mirrors that are updated to and
# geographically close to the client.  You should use this for CentOS updates
# unless you are manually picking other mirrors.
#
# If the mirrorlist= does not work for you, as a fall back you can try the 
# remarked out baseurl= line instead.
#
#

[base]
name=CentOS-$releasever - Base
baseurl=http://mirror.centos.org/altarch/$releasever/os/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
       file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7-aarch64

#released updates 
[updates]
name=CentOS-$releasever - Updates
baseurl=http://mirror.centos.org/altarch/$releasever/updates/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
       file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7-aarch64

#additional packages that may be useful
[extras]
name=CentOS-$releasever - Extras
baseurl=http://mirror.centos.org/altarch/$releasever/extras/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
       file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7-aarch64

but it also goes wrong.

here we should replace the variable “releasever"and"basearch” to the
specific one which we want to use. you can search in http://mirror.centos.org/altarch/
to see which repo you will use.

In my case, I will use:

[base]
name=CentOS-base
baseurl=http://mirror.centos.org/altarch/7.4.1708/os/aarch64/

and I also remove gpgcheck related lines.

It works fine with me :)

RedHat5.7 yum更换为CentOS yum

首次在VitualBox上装rhel-server,新手上路,对linux环境不太了解,总是会遇到很多问题。才装好系统,第一件事肯定是想马上装软件,那么RedHat用yum命令来装软件是一个很不错的选...
  • u010009145
  • u010009145
  • 2015-11-02 14:19:17
  • 1429

centos添加第三方源

centos本身yum的软件源里缺少了很多软件,可以自行添加第三方源 Linux环境:CentOS 7 执行下述命令前,你可以先到/etc/yum.repos.d/目录下ls一下,看看它们长得是啥...
  • u014568921
  • u014568921
  • 2016-06-18 09:41:49
  • 2861

添加本地cdrom到RHEL yum 源

添加本地cdrom到RHEL yum源 1. mount /dev/sr0 /mnt/cdrom/ 2. 确认是否安装以下软件包 rpm -qa |grep yum  rpm -...
  • force_eagle
  • force_eagle
  • 2012-04-05 11:57:32
  • 3815

配置网易Centos的yum源

  • 2017年12月18日 11:01
  • 13KB
  • 下载

centos添加yum官方repo源,安装,升级php5.2.x

CentOS为yum添加官方源由于centos5.4安装好后通过yum来安装php的版本是5.1.6,现在很多站点都是在5.2.x上开发的,所以我们要添加其他的yum repo 来安装Php5.2.x...
  • gunnerjason
  • gunnerjason
  • 2011-03-10 18:22:00
  • 9311

yum-install

  • 2015年04月26日 12:00
  • 1.08MB
  • 下载

Red Hat 7.3 配置使用CentOS 7.3 Yum 源

redhat 的更新包只对注册的用户生效,所以我们自己手动更改成CentOS 的更新包,CentOS几乎和redhat是一样的,所以无需担心软件包是否可安装,安装之后是否有问题,另外CentOS公司去...
  • w1573007
  • w1573007
  • 2017-03-27 10:45:25
  • 7358

RHEL7.4 yum仓库不可以用问题解

虚拟机版本:VMware 14 Pro安装的Linux版本:RHEL7.4yum软件仓库,软件仓库通常不可用,怎么办?安装其他软件过程会提示如下安装错误,百度一些文档,都相对较旧,因此在此处进行更新,...
  • qq_15165093
  • qq_15165093
  • 2018-02-28 17:17:20
  • 540

Redhat Linux创建本地YUM源

配置过程如下 创建YUM目录 使用root用户登录系统,并使用下面的命令创建目录: # mkdir /media/cdrom # mkdir /var/yum mount /dev/cd...
  • ningxinghai
  • ningxinghai
  • 2012-11-27 15:12:05
  • 10142

RHEL7.4配置CentOS Yum(163)

由于在默认情况下,RedHat 7的Yum没有源,并且RedHat的Yum源只对注册的用户生效。如果不使用Yum的话,很多软件的彼此依赖关系的确让人心累,所以手动改成Centos的Yum源就行了。第一...
  • fx_yzjy101
  • fx_yzjy101
  • 2018-03-28 15:29:19
  • 38
收藏助手
不良信息举报
您举报文章:Add CentOS yum repo in Redhat system
举报原因:
原因补充:

(最多只允许输入30个字)