Skip to content

antony@notes:~/suse$ cat "Registering-and-Upgrade-RHEL-8.md"

Registering and Upgrade RHEL 8

2024-09-24· suse ·SUSE Manager

Registering and Upgrade RHEL 8

Preface

本篇文章會介紹,如何成功將 RHEL 8 註冊為 SUSE Manager 的 Red Hat Clients 端,並在離線的環境下透過 SUSE Manager 將 RHEL 8 升級至 RHEL 9

可以透過點擊展開以下目錄,選擇想看的內容,跳轉至特定章節

:::warning

:::spoiler {state=“open”} 文章目錄

[TOC]

:::

PreRequest

SUSE Manager Server

  • 一台正在運作的 SUSE Manager 4.3

SUSE Manager Client

  • 已準備一台尚未註冊的 RHEL 8 機器
  • 8 GB 記憶體或更多
  • 2 core 以上的 vcpu

1. Import Entitlements and Certificates

# 1. SSH 連線至 RHEL 8 主機
$ ssh xxx@<ip address>

# 2. 與 Red Hat CDN 註冊 (此步驟需要上網)
$ sudo subscription-manager register
Registering to: subscription.rhsm.redhat.com:443/subscription
Username: xxx
Password:
The system has been registered with ID: bf0de019-8ba0-4442-b1b6-30e6e0ff1466
The registered system name is: localhost.localdomain

# 3. 自動將相容的訂閱附加到該系統
$ sudo subscription-manager attach
All installed products are covered by valid entitlements. No need to update subscriptions at this time.

# 4. 顯示這台主機可以存取的 subscriptions
$ sudo subscription-manager list --available

# 5. 列出系統已啟用且已知的套件儲存庫
$ sudo subscription-manager repos --list-enabled
+----------------------------------------------------------+
    Available Repositories in /etc/yum.repos.d/redhat.repo
+----------------------------------------------------------+
Repo ID:   rhel-8-for-x86_64-baseos-rpms
Repo Name: Red Hat Enterprise Linux 8 for x86_64 - BaseOS (RPMs)
Repo URL:  https://cdn.redhat.com/content/dist/rhel8/$releasever/x86_64/baseos/os
Enabled:   1

Repo ID:   rhel-8-for-x86_64-appstream-rpms
Repo Name: Red Hat Enterprise Linux 8 for x86_64 - AppStream (RPMs)
Repo URL:  https://cdn.redhat.com/content/dist/rhel8/$releasever/x86_64/appstream/os
Enabled:   1

# 6. 安裝必要套件
$ sudo yum install vim yum-utils createrepo

# 7. 將權限憑證和金鑰從用戶端系統複製可以連到 SUSE Manager Web UI 的主機:
$ scp -r/etc/pki/entitlement/ user@x.x.x.x:~

# 8. 將 Red Hat CA 憑證檔案從用戶端系統複製到與權利證書和金鑰相同的位置:
$ scp /etc/rhsm/ca/redhat-uep.pem user@x.x.x.x:~

若要在您的 Red Hat 用戶端上管理儲存庫,您需要將 CA 和權利憑證匯入 SUSE Manager Server。 這需要您執行三次匯入程序,以建立三個項目:entitlement certificate (權利憑證)、entitlement key (權利金鑰) 和 Red Hat certificate (憑證) 各一個。

1.1. Importing Certificates to the Server

  1. 在 SUSE Manager Server Web UI 上,點選到 Systems > Autoinstallation > GPG and SSL Keys. image

  2. 點選 Create Stored Key/Cert 並為權限憑證設定這些參數 image

    • Description 欄位中,輸入 Entitlement-Cert-date
    • Type 欄位中,選擇 SSL
    • Select file to upload 欄位中,瀏覽到儲存權限憑證的位置,然後選擇 .pem 憑證檔案。
    • 點選 Create Key 按鈕
    • image

2. 在 SUSE Manager Server 上管理 Red Hat Enterprise Linux 的 Software Channel

2.1. 系統要求

  • SUSE Manager Server 的 /var/spacewalk 目錄區剩餘空間量,必須有 300 G 以上的剩餘空間

2.2. 開始新增 Software Channels

2.3.1 使用 WebUI 操作步驟

  1. 勾選要加入的 SUSE Liberty Linux (版本)
  2. 點擊 “Add product” ,然後等待同步完成

image.png

  1. 確認同步完成

在 Channels 欄位呈現綠勾勾的圖示,代表完成同步

image.png