LoginSignup
3
1

More than 1 year has passed since last update.

Convert2RHELでCentOS7をRHEL7へ変換する

Last updated at Posted at 2022-05-17

はじめに

2022年5月17日現在、Red Hat株式会社ではCentOSもしくはOracle LinuxをRed Hat Enterprise Linuxへ変換するツールConvert2RHELを提供しています。
今回は実際にConvert2RHELを使い、CentOS7をRed Hat Enterprise Linux7へと変換してみました。

目次

1.前提条件
2.準備
3.Convert2RHELのインストール
4.Red Hat Enterprise Linuxへの変換
5.参考文献

1. 前提条件

Mac上のVirtual BoxにインストールされたCentOS バージョン7.9をConvert2RHELを使い、Red Hat Enterprise Linux バージョン7.9へ変換する。
変換できるOSやバージョンについては以下に記載があります。
参考:サポート対象の変換パス
参考:Convert2RHEL Support Policy

2. 準備

まずはじめに、依存関係の問題を解決するためにCent OSをアップデートします。
参考:convert2rhel fails on Centos 7 with "CRITICAL - The following kernel modules are not supported in RHEL: /lib/modules/3.10.0-1160.25.1.el7.x86_64/kernel/net/netfilter/nfnetlink.ko.xz"

 1. Cent OSのOSのバージョンを確認します

cat /etc/redhat-release

_00.png

 2. キャッシュを削除します

# yum clean all

_01.png

 3.アップデートを実行します

# yum update -y

_02.png

 4. 再起動します

# reboot

_04reboot.png

 5. カーネルの情報が最新であることを確認します。

# uname -r

_05.png

3. Convert2RHELのインストール

 1. Red Hat GPGキーをダウンロードします

# curl -o /etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release 
https://www.redhat.com/security/data/fd431d51.txt

02.png

 2. Convert2RHELリポジトリーを含む https://cdn.redhat.com サーバーのSSL証明書をダウンロードします

# curl --create-dirs -o /etc/rhsm/ca/redhat-uep.pem https://ftp.redhat.com/redhat/convert2rhel/redhat-uep.pem

03.png

 3. Convert2RHELリポジトリーファイルをインストールします

# curl -o /etc/yum.repos.d/convert2rhel.repo https://ftp.redhat.com/redhat/convert2rhel/7/convert2rhel.repo

04.png

  OSのバージョンが8のときは、以下を実行してください

# curl -o /etc/yum.repos.d/convert2rhel.repo 
https://ftp.redhat.com/redhat/convert2rhel/8/convert2rhel.repo

 4. Convert2RHELユーティリティーをインストールします

# yum -y install convert2rhel

05.png

4. Red Hat Enterprise Linuxへの変換

 1. 今回はRHSMでユーザー名、パスワード、プールIDを指定してサブスクリプションの認証を行います

# convert2rhel --username username --password password --pool pool_ID

07.png

  組織IDとアクティベーションキーを指定してサブスクリプションの認証を行う場合は以下を実行します

# convert2rhel --org organization_ID --activationkey activation_key

 2. 変換が始まります
08.png

 3. 変換を続けるか確認されるので、「y」と入力し、Enterキーを押します
09.png

  変換作業が再開されます
10.png

 4. 再び変換を続けるか確認されるので、「y」と入力し、Enterキーを押します
11.png

  変換作業が再開されます
12.png

 5. 変換作業が完了します
13.png

 6. rebootコマンドで再起動します

# reboot

14.png

 7. 再起動する際、Red Hat Enterprise Linuxのカーネルが選択できるので、Red Hat Enterprise Linuxのカーネルを選択します
15.png

 8. Red Hat Enterprise Linuxが起動します
16.png

 9. Red Hat Enterprise Linuxへ変換されたことを確認します

cat /etc/redhat-release

17.png

以上となります。

5. 参考文献

3
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
1