首頁 > 系統教程 > Linux > 主體

教你將 CentOS 8 作業系統遷移到 Oracle Linux

WBOY
發布: 2024-02-09 11:10:22
轉載
1147 人瀏覽過

Oracle Linux 是 CentOS 8 的另一個替代方案。本文將介紹如何將現有作業系統遷移到 Oracle Linux。

什麼是 Oracle Linux?

#Oracle Linux 是由 RedHat Enterprise Linux 原始碼編譯而來,以 Oracle 品牌取代了 Red Hat 品牌。它也被用於 Oracle 雲端和 Oracle 整合系統(如 Oracle Exadata 等)。

Oracle Linux 提供兩個核心。第一個是預設的 Linux 內核,它是從各個 Red Hat Enterprise Linux (RHEL) 版本的原始碼編譯而來。

第二個是 Unbreakable Enterprise Kernel (UEK),它是由 Oracle 建置並透過 Oracle Linux 支援提供支援的 Linux 核心。它透過盡可能緊密地追蹤主線原始碼,專注於效能、穩定性和最小的反向移植。 UEK 經過充分測試,並用於為 Oracle 客戶執行 Oracle 的整合系統、Oracle 雲端基礎架構和大型企業部署。

系統環境

CentOS 8 Minimal

檢查目前的 Linux 作業系統

#執行以下命令來檢查 Linux 作業系統的版本。

[root@localhost ~]# cat /etc/os-release 
NAME="CentOS Linux"
VERSION="8 (Core)"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="8"
PLATFORM_ID="platform:el8"
PRETTY_NAME="CentOS Linux 8 (Core)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:centos:centos:8"
HOME_URL="https://www.centos.org/"
BUG_REPORT_URL="https://bugs.centos.org/"

CENTOS_MANTISBT_PROJECT="CentOS-8"
CENTOS_MANTISBT_PROJECT_VERSION="8"
REDHAT_SUPPORT_PRODUCT="centos"
REDHAT_SUPPORT_PRODUCT_VERSION="8"

[root@localhost ~]# cat /etc/centos-release
CentOS Linux release 8.0.1905 (Core)
登入後複製
教你将 CentOS 8 操作系统迁移到 Oracle Linux

檢查目前 Linux 核心的版本。

[root@localhost ~]# uname -r
4.18.0-240.15.1.el8_3.x86_64
登入後複製

將 CentOS 8 遷移到 Oracle Linux

Oracle Github Repository 提供了一個 Linux bash 腳本centos2ol.sh。此腳本支援從 CentOS Linux 6、7 和 8 遷移,但不支援 CentOS Stream。

可以使用 wget 或 curl 指令輕鬆地從 GitHub 下載centos2ol.sh腳本。

[root@localhost ~]# wget https://raw.githubusercontent.com/oracle/centos2ol/main/centos2ol.sh
登入後複製

centos2ol.sh新增可執行權限:

[root@localhost ~]# chmod +x centos2ol.sh
登入後複製

準備好後,執行 centos2ol.sh 腳本以啟動 Linux 作業系統的遷移程序。

[root@localhost ~]# ./centos2ol.sh
登入後複製
教你将 CentOS 8 操作系统迁移到 Oracle Linux

centos2ol.sh 腳本列出了已安裝的軟體包,在遷移過程中,你的 Linux 作業系統軟體包已被相應的 Oracle Linux 支援的軟體包取代。

centos2ol.sh 腳本已經完成了它的工作。重新系統可以使用新的 Linux 核心啟動你的作業系統。

[root@localhost ~]# reboot
登入後複製

在系統啟動期間,GRUB 選單現在顯示 Oracle Linux Server 的兩個新項目。一個用於標準 Linux 內核,而另一個用於 Unbreakable Enterprise Kernel (UEK)。

教你将 CentOS 8 操作系统迁移到 Oracle Linux

檢查新的 Linux 作業系統:

透過執行以下命令檢查目前作業系統版本。

[root@localhost ~]# cat /etc/os-release
NAME="Oracle Linux Server"
VERSION="8.4"
ID="ol"
ID_LIKE="fedora"
VARIANT="Server"
VARIANT_ID="server"
VERSION_ID="8.4"
PLATFORM_ID="platform:el8"
PRETTY_NAME="Oracle Linux Server 8.4"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:oracle:linux:8:4:server"
HOME_URL="https://linux.oracle.com/"
BUG_REPORT_URL="https://bugzilla.oracle.com/"

ORACLE_BUGZILLA_PRODUCT="Oracle Linux 8"
ORACLE_BUGZILLA_PRODUCT_VERSION=8.4
ORACLE_SUPPORT_PRODUCT="Oracle Linux"
ORACLE_SUPPORT_PRODUCT_VERSION=8.4

[root@localhost ~]# cat /etc/oracle-release
Oracle Linux Server release 8.4
登入後複製

也要檢查新 Linux 核心的版本:

[root@localhost ~]# uname -r
5.4.17-2102.202.5.el8uek.x86_64
登入後複製

總 結

#你的 CentOS 8 作業系統已成功遷移到 Oracle Linux 和 Unbreakable Enterprise Kernel。試著試驗你的新作業系統,看看它是一個好的 CentOS 替代品嗎?

以上是教你將 CentOS 8 作業系統遷移到 Oracle Linux的詳細內容。更多資訊請關注PHP中文網其他相關文章!

來源:lxlinux.net
本網站聲明
本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發現涉嫌抄襲或侵權的內容,請聯絡admin@php.cn
熱門教學
更多>
最新下載
更多>
網站特效
網站源碼
網站素材
前端模板
關於我們 免責聲明 Sitemap
PHP中文網:公益線上PHP培訓,幫助PHP學習者快速成長!