・CentOS8からRocky Linuxへ移行する手順を知りたい。
・具体的な手順を教えてほしい。
こういった疑問に答えます。
本記事の内容
- CentOS8からRocky Linuxへ移行する手順
この記事を書いている私は、某SIerに勤務しながら、
WEB系エンジニア・インフラエンジニアに憧れて、プログラミングおよびインフラ技術の勉強をしています。
こういった私が、解説していきます。
私が実機で試したコマンドや画像を載せて書いています。
記事の信頼性担保に繋がると思います。
CentOS8からRocky Linuxへ移行する手順
CentOS8は、2021年12月末でサポートが終了
CentOS8は、2021年12月末でサポートが終了してしまいました。
CentOS8からRocky Linuxへ移行する手順
手順①:事前確認(現在のバージョンを確認)
cat /etc/redhat-release
[root@sv-neptune ~]# cat /etc/redhat-release CentOS Linux release 8.5.2111
uname -r
[root@sv-neptune ~]# uname -r 4.18.0-348.2.1.el8_5.x86_64
手順②:マイグレーションツールのダウンロード
curl https://raw.githubusercontent.com/rocky-linux/rocky-tools/main/migrate2rocky/migrate2rocky.sh -o migrate2rocky.sh
[root@sv-neptune ~]# curl https://raw.githubusercontent.com/rocky-linux/rocky-tools/main/migrate2rocky/migrate2rocky.sh -o migrate2rocky.sh % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 44912 100 44912 0 0 163k 0 --:--:-- --:--:-- --:--:-- 163k
手順③:マイグレーションツールに実行権限を付与
chmod u+x migrate2rocky.sh
[root@sv-neptune ~]# chmod u+x migrate2rocky.sh
-rwxr--r-- 1 root root 44912 5月 25 08:08 migrate2rocky.sh
手順④:マイグレーションツールの実行
./migrate2rocky.sh -r
[root@sv-neptune ~]# ./migrate2rocky.sh -r
Removing dnf cache Preparing to migrate CentOS Linux 8 to Rocky Linux 8. Determining repository names for CentOS Linux 8...... Found the following repositories which map from CentOS Linux 8 to Rocky Linux 8: CentOS Linux 8 Rocky Linux 8 appstream appstream baseos baseos extras extras Getting system package names for CentOS Linux 8.......... Found the following system packages which map from CentOS Linux 8 to Rocky Linux 8: CentOS Linux 8 Rocky Linux 8 centos-logos-ipa rocky-logos-ipa centos-backgrounds rocky-backgrounds centos-gpg-keys rocky-gpg-keys centos-logos rocky-logos centos-indexhtml rocky-indexhtml centos-linux-release rocky-release centos-logos-httpd rocky-logos-httpd centos-linux-repos rocky-repos Getting list of installed system packages. We will replace the following CentOS Linux 8 packages with their Rocky Linux 8 equivalents Packages to be Removed Packages to be Installed centos-gpg-keys rocky-gpg-keys centos-logos rocky-logos centos-linux-release rocky-release centos-logos-httpd rocky-logos-httpd centos-linux-repos rocky-repos Getting a list of enabled modules for the system repositories.
手順⑤:再起動
マイグレーションツールが完了すると以下のように表示されるので再起動します。
Done, please reboot your system. A log of this installation can be found at /var/log/migrate2rocky.log
reboot
手順⑥:事後確認(変更後のバージョンを確認)
cat /etc/redhat-release
[root@sv-neptune ~]# cat /etc/redhat-release Rocky Linux release 8.6 (Green Obsidian)
uname -r
[root@sv-neptune ~]# uname -r 4.18.0-372.9.1.el8.x86_64
ls -l /etc/yum.repos.d/
[root@sv-neptune ~]# ls -l /etc/yum.repos.d/ 合計 132 -rw-r--r-- 1 root root 721 5月 25 08:13 CentOS-Linux-AppStream.repo.rpmsave -rw-r--r-- 1 root root 706 5月 25 08:13 CentOS-Linux-BaseOS.repo.rpmsave -rw-r--r-- 1 root root 1132 5月 25 08:13 CentOS-Linux-ContinuousRelease.repo.rpmsave -rw-r--r-- 1 root root 734 5月 25 08:13 CentOS-Linux-Devel.repo.rpmsave -rw-r--r-- 1 root root 706 5月 25 08:13 CentOS-Linux-Extras.repo.rpmsave -rw-r--r-- 1 root root 721 5月 25 08:13 CentOS-Linux-FastTrack.repo.rpmsave -rw-r--r-- 1 root root 742 5月 25 08:13 CentOS-Linux-HighAvailability.repo.rpmsave -rw-r--r-- 1 root root 708 5月 25 08:13 CentOS-Linux-Plus.repo.rpmsave -rw-r--r-- 1 root root 726 5月 25 08:13 CentOS-Linux-PowerTools.repo.rpmsave -rw-r--r-- 1 root root 710 6月 4 20:12 Rocky-AppStream.repo -rw-r--r-- 1 root root 695 6月 4 20:12 Rocky-BaseOS.repo -rw-r--r-- 1 root root 1753 5月 21 06:44 Rocky-Debuginfo.repo -rw-r--r-- 1 root root 360 5月 21 06:44 Rocky-Devel.repo -rw-r--r-- 1 root root 695 6月 4 20:12 Rocky-Extras.repo -rw-r--r-- 1 root root 731 5月 21 06:44 Rocky-HighAvailability.repo -rw-r--r-- 1 root root 680 5月 21 06:44 Rocky-Media.repo -rw-r--r-- 1 root root 680 5月 21 06:44 Rocky-NFV.repo -rw-r--r-- 1 root root 690 5月 21 06:44 Rocky-Plus.repo -rw-r--r-- 1 root root 715 5月 21 06:44 Rocky-PowerTools.repo -rw-r--r-- 1 root root 681 5月 21 06:44 Rocky-RT.repo -rw-r--r-- 1 root root 746 5月 21 06:44 Rocky-ResilientStorage.repo -rw-r--r-- 1 root root 2335 5月 21 06:44 Rocky-Sources.repo -rw-r--r-- 1 root root 1395 6月 4 20:10 epel-modular.repo -rw-r--r-- 1 root root 1485 9月 5 2021 epel-modular.repo.rpmnew -rw-r--r-- 1 root root 1564 9月 5 2021 epel-playground.repo -rw-r--r-- 1 root root 1584 9月 5 2021 epel-testing-modular.repo -rw-r--r-- 1 root root 1521 9月 5 2021 epel-testing.repo -rw-r--r-- 1 root root 1332 6月 4 20:10 epel.repo -rw-r--r-- 1 root root 1422 9月 5 2021 epel.repo.rpmnew -rw-r--r-- 1 root root 358 5月 25 08:19 redhat.repo -rw-r--r-- 1 root root 1825 6月 4 20:10 remi-modular.repo -rw-r--r-- 1 root root 810 6月 4 20:10 remi-safe.repo -rw-r--r-- 1 root root 1448 2月 15 19:40 remi.repo