antony@notes:~/suse$ cat "Registering-and-Upgrade-RHEL-8.md"
Registering and Upgrade RHEL 8
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
在 SUSE Manager Server Web UI 上,點選到 Systems > Autoinstallation > GPG and SSL Keys.

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

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

- 在 Description 欄位中,輸入
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 操作步驟
- 勾選要加入的 SUSE Liberty Linux (版本)
- 點擊 “Add product” ,然後等待同步完成

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