Add CentOS yum repo in Redhat system

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 :)

阅读更多
上一篇Some tips to help to boot a installed Linux distribution manually
下一篇rpm yum使用笔记
想对作者说点什么? 我来说一句

配置网易Centosyum

2017年12月18日 13KB 下载

yum-install

2015年04月26日 1.08MB 下载

没有更多推荐了,返回首页

关闭
关闭