在IBM Cloud的虚拟服务器上使用Red Hat Enterprise Linux 8,在CentOS PowerTools上使用CodeReady Linux Builder等效工具

的是什么?
为什么需要这个?
为了什么而做?
我们的目标是什么?
我们想达到什么?

CodeReady Linux Builder(以下、CodeReady)是Red Hat Enterprise Linux(以下、RHEL)附带的一个存储库,其中包含开发人员所需的软件包。通常情况下,它是在RHEL的订阅合约范围内可用的,但是我们发现它在使用IBM Cloud虚拟服务器的订阅中不可用(经过支持团队确认)。

顺便提一下,AWS EC2上的RHEL似乎可以使用。

请问您需要对以下内容进行中文释义吗?

https://aws.amazon.com/jp/premiumsupport/knowledge-center/ec2-enable-epel/

所以,本次将介绍使用CentOS PowerTools作为CodeReady的替代方法。当然由于无保证情况下,需承担个人责任。

CentOS PowerTools是什么?

CentOS被广泛知悉作为RHEL(Red Hat企业版Linux)的开源软件的克隆版本,但由于商标问题,Red Hat公司的CodeReady Linux Builder无法使用该名称,因此被命名为PowerTools。

RHEL(CentOS)有名的外部软件仓库是EPEL,但CodeReady(PowerTools)并不与EPEL竞争,而是被视为EPEL的补充。因此,有时可以通过CodeReady(PowerTools)来添加EPEL缺少的软件。

对于CentOS 8来说,默认情况下,PowerTools存储库已添加到/etc/yum.repos.d/CentOS-PowerTools.repo中。但是,它是被禁用的,因此在使用之前需要启用它。

# dnf config-manager --set-enabled PowerTools

启用RHEL8上的PowerTools。

手动添加PowerTools存储库。这是CentOS 8默认的存储库定义。

# CentOS-PowerTools.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.
#
#
[PowerTools]
name=CentOS-$releasever - PowerTools
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=PowerTools&infra=$infra
#baseurl=http://mirror.centos.org/$contentdir/$releasever/PowerTools/$basearch/os/
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial

我会额外安装GPG密钥。虽然它与上一行不匹配,但我会假装没有看到。

# rpmkeys --import https://www.centos.org/keys/RPM-GPG-KEY-CentOS-Official

根据需要,随后将激活PowerTools存储库。

# dnf list --enablerepo PowerTools
# dnf config-manager --set-enabled PowerTools