注册 SUSE Liberty Linux 客户端

本节包含有关注册运行 SUSE Liberty Linux 操作系统的客户端的信息。SUSE Liberty Linux 客户端基于 Red Hat Enterprise Linux 或 CentOS。

SUSE Liberty Linux 客户端有时也称为 SUSE Linux Enterprise Server with Expanded Support (SLESES)、Liberty、RES 或 Red Hat Expanded Support。

SUSE 提供的 SUSE Liberty Linux 软件通道只提供软件包更新,不提供软件包本身。要注册 SUSE Liberty Linux 客户端,您需要注册(下面列出的)SUSE Liberty Linux 产品以创建必需的基础通道,然后导入任何所需的 Red Hat 或 CentOS 软件包作为自定义子通道。您必须直接从 Red Hat 或 CentOS 获取初始软件包,然后才能应用 SUSE Liberty Linux 软件通道提供的更新。

  • SUSE Liberty Linux 储存库 URL 可从 SUSE Customer Center 获取

  • 软件包和元数据由 SUSE 提供

  • 有关支持的产品,请参见支持表格和版本说明

您需负责安排对 Red Hat 或 CentOS 基础媒体储存库和安装媒体的访问权限。

对于您的所有 SUSE Liberty Linux 系统,您均须从 SUSE 获取支持。

1. 添加软件通道

对于 SUSE Liberty Linux 客户端,所需的一些软件包包含在 Red Hat Enterprise Linux 或 CentOS 安装媒体中。您必须安装这些软件包才能注册 SUSE Liberty Linux 客户端。

SUSE Liberty Linux 产品由 SUSE Customer Center 提供,其中还包含客户端工具软件包。

将 SUSE Liberty Linux 客户端注册到您的 SUSE Multi-Linux Manager 服务器之前,您需要添加所需的软件通道,并同步这些通道。

您需要选择两组不同的通道,一组通道用于提供 SUSE Liberty Linux,另一组通道用于提供客户端工具。

您需要与适当 SUSE Liberty Linux 通道关联的激活密钥。有关激活密钥的详细信息,请参见 激活密钥

In the following section, descriptions often default to the x86_64 architecture. Replace it with other architectures if appropriate.

此过程所需的产品包括:

Table 1. ES 产品 - WebUI
OS Version Product Name

SUSE Liberty Linux 10

RHEL or SLES ES and Liberty 10 x86_64

SUSE Liberty Linux 9.6 EMS

SUSE Liberty Linux 9.6 EMS x86_64

SUSE Liberty Linux 9

RHEL or SLES ES and Liberty 9 x86_64

SUSE Liberty Linux 8

RHEL or SLES ES or CentOS 8 Base and SUSE Linux Enterprise Server with Expanded Support 8 x86_64

SUSE Liberty Linux 7

SUSE Linux Enterprise Server with Expanded Support 7 x86_64

SUSE Liberty Linux LTSS 7

SUSE Linux Enterprise Server with Expanded Support LTSS 7 x86_64

SUSE Liberty Linux LTSS for Oracle 7

SUSE Linux Enterprise Server with Expanded Support LTSS for Oracle 7 x86_64

SUSE Multi-Linux Manager 需要包含其他软件的工具通道。此过程将创建以下工具通道:

Table 2. ES 工具通道
OS Version Base Channel Tools Channel

SUSE Liberty Linux 10

RHEL and Liberty 10 Base

ManagerTools-EL10-Pool for x86_64 and ManagerTools-EL10-Updates for x86_64

SUSE Liberty Linux 9.6 EMS

RHEL and Liberty 9.6 EMS Base

ManagerTools-EL9-Pool for x86_64 and ManagerTools-EL9-Updates for x86_64

SUSE Liberty Linux 9

RHEL and Liberty 9 Base

ManagerTools-EL9-Pool for x86_64 and ManagerTools-EL9-Updates for x86_64

SUSE Liberty Linux 8

RHEL or SLES ES or CentOS 8 Base

RES8-Manager-Tools-Pool for x86_64 and RES8-Manager-Tools-Updates for x86_64

SUSE Liberty Linux 7

RHEL Expanded Support 7

RES7-SUSE-Manager-Tools x86_64

SUSE Liberty Linux LTSS 7

RHEL Expanded Support LTSS 7

RES-7-SUSE-Manager-Tools for x86_64 LBT7

SUSE Liberty Linux LTSS for Oracle 7

RHEL Expanded Support LTSS for Oracle 7

RES-7-SUSE-Manager-Tools for x86_64 LBTOL7

过程:添加软件通道
  1. 在 SUSE Multi-Linux Manager Web UI 中,导航到管理  安装向导  产品

  2. 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 recommended toggle 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. 单击 添加产品 并等待产品完成同步。

此过程所需的通道包括:

Table 3. ES 通道 - CLI
OS Version Base Channel Client Channel Tools Channel

SUSE Liberty Linux 10

el10-pool-x86_64

-

managertools-el10-pool-x86_64

SUSE Liberty Linux 9.6 EMS

el9-pool-x86_64

-

managertools-el9-pool-x86_64

SUSE Liberty Linux 9

el9-pool-x86_64

-

managertools-el9-pool-x86_64

SUSE Liberty Linux 8

rhel8-pool-x86_64

-

managertools-el8-pool-x86_64

SUSE Liberty Linux 7

rhel-x86_64-server-7

-

managertools-el7-pool-x86_64

SUSE Liberty Linux LTSS 7

res-7-ltss-updates-x86_64

-

res-7-suse-manager-tools-x86_64-lbt7

SUSE Liberty Linux LTSS for Oracle 7

res-7-ol-ltss-updates-x86_64

-

res-7-suse-manager-tools-x86_64-lbtol7

过程:在命令提示符处添加软件通道
  1. With the spacewalk-common-channels command you can add the appropriate channels. At the command prompt on the SUSE Multi-Linux Manager container host, as root, execute the following command:

    mgrctl exec -ti -- spacewalk-common-channels \
    <base_channel_label> \
    <child_channel_label_1> \
    <child_channel_label_2> \
    ... <child_channel_label_n>

    要列出所有可用储存库,请执行以下命令:

    mgrctl exec -- spacewalk-common-channels -l
  2. 如果自动同步处于关闭状态,请同步通道:

    mgrctl exec -ti -- spacewalk-repo-sync -p <base_channel_label>
  3. 确保同步已完成,然后再继续操作。

1.1. Add base media

SUSE Liberty Linux 软件通道只提供更新,不提供软件包本身。要注册 SUSE Liberty Linux 客户端,请先注册(下面列出的)SUSE Liberty Linux 产品以创建基础通道,然后导入必要的 Red Hat 或 CentOS 软件包作为自定义子通道。必须直接从 Red Hat 或 CentOS 获取初始软件包,然后才能应用 SUSE Liberty Linux 提供的更新。重要的是,您无需维持 Red Hat 订阅,但需要咨询法律部门以确定迁移期间是否存在任何需要向 Red Hat 付款的义务。为了确保您拥有所需的全部软件包,请使用完整的 DVD 映像,而非极简或 JeOS 映像。

您可以使用 SUSE Multi-Linux Manager 自定义通道设置 Red Hat Enterprise Linux 或 CentOS 媒体。基础媒体上的所有软件包都必须镜像到一个子通道。

您可以自由选择通道名称。

Procedure: Creating custom channels
  1. 在 SUSE Multi-Linux Manager 服务器 Web UI 上,导航到软件  管理  通道

  2. 单击 创建通道,然后为通道设置相应的参数。

  3. In the Parent Channel field, select the appropriate base channel.

  4. 单击 创建通道

  5. 对需要创建的所有通道重复以上步骤。每个自定义储存库都应该有一个自定义通道。

您可以导航到软件  通道列表  所有,以检查是否已创建所有相应的通道和储存库。

For Red Hat 10, 9 and 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.

Procedure: Adding base media to custom channels (RHEL 7.0 example)

You must use the original installation media from Red Hat. You must use a major version release (for example 7), not a minor release (for example 7.9).

  1. Copy the base media image to the SUSE Multi-Linux Manager Server container host to the /tmp/ directory.

  2. 要将基础媒体映像添加到 SUSE Multi-Linux Manager 服务器容器,请使用:

    mgradm distribution copy /tmp/rhel-server-7.0-x86_64-dvd.iso rhel-server-7.0

    The destination in the container will be /srv/www/distributions/rhel-server-7.0.

  3. 将软件包导入您之前创建的子通道:

    mgrctl exec -- spacewalk-repo-sync -c <channel-label> -u file:///srv/www/distributions/rhel-server-7.0/

对于版本 9 和 8 客户端,请相应调整标签和目录,此外还需同步基础通道和 AppStream 通道:

mgrctl exec -- spacewalk-repo-sync -c <channel-label> -u file:///srv/www/distributions/rhel-server-9.0/BaseOS
mgrctl exec -- spacewalk-repo-sync -c <channel-label> -u file:///srv/www/distributions/rhel-server-9.0/AppStream

或:

mgrctl exec -- spacewalk-repo-sync -c <channel-label> -u file:///srv/www/distributions/rhel-server-8.0/BaseOS
mgrctl exec -- spacewalk-repo-sync -c <channel-label> -u file:///srv/www/distributions/rhel-server-8.0/AppStream

1.1.1. OPTIONAL: Add base media from a content URL

或者,如果您可以访问 Red Hat CDN 或 CentOS 提供的内容 URL,则可以创建自定义储存库以镜像软件包。

此过程所需的细节包括:

Table 4. ES 自定义储存库设置
Option Parameter

Repository URL

The content URL provided by Red Hat CDN or CentOS

Has Signed Metadata?

Uncheck all Red Hat Enterprise repositories

SSL CA Certificate

redhat-uep (Red Hat only)

SSL Client Certificate

Entitlement-Cert-date (Red Hat only)

SSL Client Key

Entitlement-Key-date (Red Hat only)

Procedure: Creating custom repositories
  1. 在 SUSE Multi-Linux Manager 服务器 Web UI 上,导航到软件  管理  储存库

  2. 单击 创建储存库,然后为储存库设置适当的参数。

  3. 单击 创建储存库

  4. 对需要创建的所有储存库重复以上步骤。

创建所有通道之后,可以将其与您创建的储存库关联:

Procedure: Associating channels with repositories
  1. 在 SUSE Multi-Linux Manager 服务器 Web UI 上,导航到软件  管理  通道,然后单击要关联的通道。

  2. Navigate to the Repositories tab, and check the repository to associate with this channel.

  3. 单击 更新储存库 以将通道与储存库相关联。

  4. 对需要关联的所有通道和储存库重复以上步骤。

  5. OPTIONAL: Navigate to the Sync tab to set a recurring schedule for synchronization of this repository.

  6. 单击 立即同步 以立即开始同步。

2. 检查同步状态

过程:通过 Web UI 检查同步进度
  1. In the SUSE Multi-Linux Manager Web UI, navigate to Admin  Setup Wizard and select the Products tab. This dialog displays a completion bar for each product when they are being synchronized.

  2. Alternatively, you can navigate to Software  Manage  Channels, then click the channel associated to the repository. Navigate to the Repositories tab, then click Sync and check Sync Status.

过程:通过命令行检查同步进度
  1. 要在跟踪日志前列出可用日志,请在容器主机上运行以下命令:

    mgrctl exec ls /var/log/rhn/reposync/
  2. 在 SUSE Multi-Linux Manager 容器主机的命令提示符处,以 root 身份检查通道日志文件的同步:

    mgrctl exec -ti -- tail -f /var/log/rhn/reposync/<channel-label>.log
  3. 每个子通道在同步过程中会生成自身的日志。您需要检查所有基础通道和子通道日志文件,以确保同步完成。

SUSE Liberty Linux 通道可能会非常大。有时,初始通道同步所需的时间可能会长达数小时。

初始同步完成后,建议您克隆通道后再加以使用。这样您便拥有一份原始同步数据的备份。

3. Register SUSE Liberty Linux clients

要注册您的客户端,需要有引导储存库。系统默认会自动创建引导储存库,并且每天会为所有同步的产品重新生成该储存库。您可以在容器主机的命令提示符处手动创建引导储存库:

mgrctl exec -ti mgr-create-bootstrap-repo

有关注册客户端的详细信息,请参见 客户端注册

4. 将 Enterprise Linux (EL) 客户端迁移到 SUSE Liberty Linux

如果某个 Enterprise Linux (EL) 客户端(例如 Red Hat Enterprise Linux 和 CentOS)已在 SUSE Multi-Linux Manager 上注册为受控端,而用户想要将其迁移到 SUSE Liberty Linux,则可以使用重新激活密钥来应用用于驱动迁移的激活密钥。

有关重新激活密钥的详细信息,请参见 client-configuration:activation-keys.adoc#activation-keys-reactivation

重新激活密钥按受控端分配,可以通过 Web UI 或使用 API 来生成。有关详细信息,请参见 https://documentation.suse.com/multi-linux-manager/5.1/api/suse-manager/api/system.html#apidoc-system-obtainReactivationKey-loggedInUser-sid

要重新激活客户端,用户可以在客户端上运行引导脚本,并以环境变量的形式传递重新激活密钥。例如:

REACTIVATION_KEY=<KEY> ./bootstrap_liberate9.sh

Another method is to add some special flags to the Salt client configuration file located at /etc/venv-salt-minon/minion.d/susemanager.conf (or /etc/salt-minon/minion.d/susemanager.conf) the following content (join this content with the already existing one):

grains:
    susemanager:
        activation_key: "<KEY_ID>"
        management_key: "MINION_REACTIVATION_KEY"

After changing the susemanager.conf file, the salt-minion service needs to be restarted on the Salt server. By default with:

systemctl restart venv-salt-minon

对于旧版 Salt,请运行以下命令:

systemctl restart salt-minon

4.1. The liberate formula

Migrating Enterprise Linux (EL) clients to SUSE Liberty Linux with the liberate formula. For more information, see Liberate Formula.