使用 CDN 注册 Red Hat Enterprise Linux 客户端
|
RHEL 10 requires x86-64-v3 CPU architecture. Red Hat Enterprise Linux 10 has raised the minimum supported x86-64 microarchitecture baseline to x86-64-v3. Systems running on x86-64-v1 or x86-64-v2 CPUs (e.g., pre-Haswell Intel or pre-Excavator AMD processors) cannot run RHEL 10 and will not be supported. This affects both physical hosts and virtual machines. Hypervisors (e.g., VMware EVC, KVM, etc.) must be configured to expose AVX/AVX2 CPU capabilities to guest VMs, otherwise RHEL 10 installation or boot will fail. Before deploying or upgrading to RHEL 10, verify that your hardware meets the x86-64-v3 requirement. References: |
如果您是直接运行 Red Hat Enterprise Linux 客户端而不是使用 SUSE Linux Enterprise Server with Expanded Support 来运行,则需要使用 Red Hat 源检索并更新软件包。
本节包含有关使用 Red Hat 内容分发网络 (CDN) 注册运行 Red Hat Enterprise Linux 操作系统的客户端的信息。
而有关使用 Red Hat 更新基础结构 (RHUI) 的信息,请参见 使用 RHUI 注册 Red Hat Enterprise Linux 客户端。
|
Red Hat Enterprise Linux 客户端基于 Red Hat,与 SUSE Linux Enterprise Server with Expanded Support、RES 或 SUSE Linux Enterprise Server 不相关。 您需负责安排对 Red Hat 基础媒体储存库和 RHEL 安装媒体的访问权限,以及将 SUSE Multi-Linux Manager 服务器连接到 Red Hat 内容分发网络。对于您的所有 RHEL 系统,均须从 Red Hat 获取支持。如果不这么做,可能会违反 Red Hat 的条款。 |
1. 导入权利和证书
Red Hat 客户端需要 Red Hat 证书颁发机构 (CA) 和权利证书以及权利密钥。
权利证书内嵌失效日期,与支持订阅的期限匹配。为避免服务中断,您需要在每个支持订阅期结束时重复此过程。
Red Hat 提供了一个订阅管理器工具,可用于管理订阅指派。此工具在本地运行,可跟踪安装的产品和订阅。客户端必须在订阅管理器中注册才能获得证书。
Red Hat 客户端使用 URL 来复制储存库。URL 更改取决于 Red Hat 客户端是在何处注册的。
Red Hat 客户端可通过三种方式注册:
-
redhat.com 上的 Red Hat 内容分发网络 (CDN)
-
Red Hat 从属服务器
-
云中的 Red Hat 更新基础结构 (RHUI)
本指南将介绍注册到 Red Hat CDN 的客户端。您至少须有一个注册到 CDN 的系统并拥有授权订阅,以获得储存库内容。
而有关使用 Red Hat 更新基础结构 (RHUI) 的信息,请参见 使用 RHUI 注册 Red Hat Enterprise Linux 客户端。
|
要为客户端系统使用从属证书,必须有从属服务器和订阅。SUSE Multi-Linux Manager 服务器不支持使用从属证书的客户端。 |
|
权利证书内嵌失效日期,与支持订阅的期限匹配。为避免服务中断,您需要在每个支持订阅期结束时重复此过程。 |
Red Hat 提供了订阅管理器工具,可用于管理订阅指派。此工具在客户端系统本地运行,可跟踪安装的产品和订阅。使用订阅管理器注册到 redhat.com,然后执行下列过程获得证书。
-
在客户端系统上的命令提示符处注册订阅管理器工具:
subscription-manager register
出现提示时,输入您的 Red Hat 门户用户名和口令。
-
运行以下命令:
subscription-manager activate
-
将客户端系统中的权利证书和密钥复制到 SUSE Multi-Linux Manager 服务器可访问的位置:
cp/etc/pki/entitlement/ /<example>/entitlement/
Your entitlement certificate and key both have a file extension of
.pem. The key also haskeyin the filename. -
将客户端系统中的 Red Hat CA 证书文件复制到权利证书和密钥所在的相同网络位置:
cp /etc/rhsm/ca/redhat-uep.pem /<example>/entitlement
要管理 Red Hat 客户端上的储存库,您需要将 CA 和权利证书导入 SUSE Multi-Linux Manager 服务器。这需要您执行三次导入过程以创建相应的三项: 三项分别对应权利证书、权利密钥和 Red Hat 证书。
-
在 SUSE Multi-Linux Manager 服务器 Web UI 上,导航到。
-
单击 创建存储的密钥/证书,并为权利证书设置下列参数:
-
In the
Descriptionfield, typeEntitlement-Cert-date. -
In the
Typefield, selectSSL. -
In the
Select file to uploadfield, browse to the location where you saved the entitlement certificate, and select the.pemcertificate file.
-
-
单击 创建密钥。
-
单击 创建存储的密钥/证书,并为权利密钥设置下列参数:
-
In the
Descriptionfield, typeEntitlement-key-date. -
In the
Typefield, selectSSL. -
In the
Select file to uploadfield, browse to the location where you saved the entitlement key, and select the.pemkey file.
-
-
单击 创建密钥。
-
单击 创建存储的密钥/证书,并为 Red Hat 证书设置下列参数:
-
In the
Descriptionfield, typeredhat-uep. -
In the
Typefield, selectSSL. -
In the
Select file to uploadfield, browse to the location where you saved the Red Hat certificate, and select the certificate file.
-
-
单击 创建密钥。
2. 添加软件通道
将 Red Hat 客户端注册到您的 SUSE Multi-Linux Manager 服务器之前,您需要添加所需的软件通道,并同步这些通道。
|
In the following section, descriptions often default to the |
拥有 SUSE Multi-Linux Manager 订阅,您便能使用 SUSE Linux Enterprise Server with Expanded Support(也称为 Red Hat 扩展支持或 RES)的工具通道。必须使用客户端工具通道来创建引导储存库。此过程适用于 Salt 客户端。
此过程所需的产品包括:
| OS Version | Product Name |
|---|---|
Red Hat 10 |
RHEL and Liberty 10 Base |
Red Hat 9 |
RHEL and Liberty 9 Base |
Red Hat 8 |
RHEL or SLES ES or CentOS 8 Base |
Red Hat 7 |
RHEL7 Base x86_64 |
在 SUSE Multi-Linux Manager Web UI 中,导航到。
Locate the appropriate products for your client operating system and architecture using the search bar, and check the appropriate product. This will automatically check all mandatory channels. Also all recommended channels are checked as long as the
include recommendedtoggle is turned on. Click the arrow to see the complete list of related products, and ensure that any extra products you require are checked.单击 添加产品 并等待产品完成同步。
3. 准备自定义储存库和通道
要从 Red Hat CDN 镜像软件,需要在 SUSE Multi-Linux Manager 中创建自定义通道和储存库,它们都将通过 URL 链接到 CDN。必须在 Red Hat 门户中拥有这些产品的权利,此功能才能正常工作。可以使用订阅管理器工具获得要镜像的储存库的 URL:
subscription-manager repos
可以使用这些储存库 URL 来创建自定义储存库。这样您便可只镜像管理客户端所需的内容。
|
如果您在 Red Hat 门户中拥有正确的权利,就可以只创建 Red Hat 储存库的自定义版本。 |
此过程所需的细节包括:
| Option | Setting |
|---|---|
Repository URL |
The content URL provided by Red Hat CDN |
Has Signed Metadata? |
Uncheck all Red Hat Enterprise repositories |
SSL CA Certificate |
|
SSL Client Certificate |
|
SSL Client Key |
|
在 SUSE Multi-Linux Manager 服务器 Web UI 上,导航到。
单击 创建储存库,然后为储存库设置适当的参数。
单击 创建储存库。
对需要创建的所有储存库重复以上步骤。
此过程所需的通道包括:
| OS Version | Base Product | Base Channel |
|---|---|---|
Red Hat 10 |
RHEL and Liberty 10 Base |
el10-pool-x86_64 |
Red Hat 9 |
RHEL and Liberty 9 Base |
el9-pool-x86_64 |
Red Hat 8 |
RHEL or SLES ES or CentOS 8 Base |
rhel8-pool-x86_64 |
Red Hat 7 |
RHEL7 Base x86_64 |
rhel7-pool-x86_64 |
在 SUSE Multi-Linux Manager 服务器 Web UI 上,导航到。
单击 创建通道,然后为通道设置相应的参数。
In the
Parent Channelfield, select the appropriate base channel.单击 创建通道。
对需要创建的所有通道重复以上步骤。每个自定义储存库都应该有一个自定义通道。
您可以导航到,以检查是否已创建所有相应的通道和储存库。
|
For Red Hat 10, Red Hat 9 and Red Hat 8 clients, add both the Base and AppStream channels. You require packages from both channels. If you do not add both channels, you cannot create the bootstrap repository, due to missing packages. |
If you are using modular channels, you must enable the Python 3.6 module stream on the client. If you do not provide Python 3.6, the installation of the spacecmd package will fail.
创建所有通道之后,可以将其与您创建的储存库关联:
在 SUSE Multi-Linux Manager 服务器 Web UI 上,导航到,然后单击要关联的通道。
Navigate to the
Repositoriestab, and check the repository to associate with this channel.单击 更新储存库 以将通道与储存库相关联。
对需要关联的所有通道和储存库重复以上步骤。
OPTIONAL: Navigate to the
Synctab to set a recurring schedule for synchronization of this repository.单击 立即同步 以立即开始同步。
4. 检查同步状态
In the SUSE Multi-Linux Manager Web UI, navigate to and select the
Productstab. This dialog displays a completion bar for each product when they are being synchronized.Alternatively, you can navigate to , then click the channel associated to the repository. Navigate to the
Repositoriestab, then clickSyncand checkSync Status.
要在跟踪日志前列出可用日志,请在容器主机上运行以下命令:
mgrctl exec ls /var/log/rhn/reposync/在 SUSE Multi-Linux Manager 容器主机的命令提示符处,以 root 身份检查通道日志文件的同步:
mgrctl exec -ti -- tail -f /var/log/rhn/reposync/<channel-label>.log每个子通道在同步过程中会生成自身的日志。您需要检查所有基础通道和子通道日志文件,以确保同步完成。
|
Red Hat Enterprise Linux 通道可能非常大。同步所需的时间可能长达数小时。 |
-
在 SUSE Multi-Linux Manager 服务器 Web UI 上,导航到。
-
单击 创建状态通道。
-
In the
Namefield, typesubscription-manager: disable yum plugins. -
In the
Labelfield, typesubscription-manager-disable-yum-plugins. -
In the
Descriptionfield, typesubscription-manager: disable yum plugins. -
In the
SLS Contentsfield, leave it empty.
-
-
单击 创建配置通道
-
单击 创建配置文件
-
In the
Filename/Pathfield type/etc/yum/pluginconf.d/subscription-manager.conf. -
In the
File Contentsfield type:[main] enabled=0
-
-
单击 创建配置文件
-
Take note of the value of the field
Salt Filesystem Path. -
单击配置通道的名称。
-
Click on
View/Edit 'init.sls' File-
In the
File Contentsfield, type:configure_subscription-manager-disable-yum-plugins: cmd.run: - name: subscription-manager config --rhsm.auto_enable_yum_plugins=0 - watch: - file: /etc/yum/pluginconf.d/subscription-manager.conf file.managed: - name: /etc/yum/pluginconf.d/subscription-manager.conf - source: salt:///etc/yum/pluginconf.d/subscription-manager.conf
-
-
单击 更新配置文件。
|
The |
-
在 SUSE Multi-Linux Manager 服务器 Web UI 上,导航到。
-
单击 创建组。
-
In the
Namefield, typerhel-systems. -
In the
Descriptionfield, typeAll RHEL systems.
-
-
单击 创建组。
-
Click
Statestab. -
Click
Configuration Channelstab. -
Type
subscription-manager: disable yum pluginsat the search box. -
单击 搜索 以查看状态。
-
Click the checkbox for the state at the
Assigncolumn. -
单击 保存更改。
-
单击 确认。
如果您已将 RHEL 系统添加到 SUSE Multi-Linux Manager,请将其指派给新的系统组,然后应用 Highstate。
您需要修改用于 RHEL 系统的激活密钥,以包含之前创建的系统组。
-
在 SUSE Multi-Linux Manager 服务器 Web UI 上,导航到。
-
单击用于 RHEL 系统的每个激活密钥并:
-
Navigate to the
Groupstab, and theJoinsubtab. -
Check
Select rhel-systems. -
单击 加入所选的组。
5. 管理 GPG 密钥
安装软件包之前,客户端会使用 GPG 密钥检查这些软件包的真实性。只有可信软件才能安装在客户端上。
|
信任 GPG 密钥对于客户端的安全非常重要。由管理员来决定需要哪些密钥,可以信任哪些密钥。这是因为如果不信任 GPG 密钥,便无法使用软件通道,是否将通道指派给客户端取决于是否信任密钥。 |
有关 GPG 密钥的详细信息,请参见 GPG 密钥。
|
For the Red Hat custom channels, if you want to check the 有关 Red Hat 产品签名密钥的完整列表,请参见 https://access.redhat.com/security/team/key。 |