AlmaLinux8からAlmaLinux9への移行

Table of Contents

使用しているソフトの推奨がRed Hat Enterprise Linux 9に代わり今後の対応が心配になったんで、AlmaLinux8からAlmaLinux9に移行
下記サイトを参考に実施
ELevating CentOS 7 to AlmaLinux 9 | AlmaLinux Wiki

OSを最新の状態に更新

# dnf update

Elevate-Releaseパッケージをインストール

# dnf install -y http://repo.almalinux.org/elevate/elevate-release-latest-el$(rpm --eval %rhel).noarch.rpm

Leappパッケージをインストール

# dnf install -y leapp-upgrade leapp-data-almalinux

アップグレードチェック

# leapp preupgrade

[/var/log/leapp/leapp-report.txt]に出力された「Errors」「Inhibitors」の指摘内容を対応

対応例

・ルートでの接続を無効化

# diff sshd_config sshd_config.org
44c44
< #PermitRootLogin yes
---
> PermitRootLogin yes

・ファイヤーウォールのゾーン化を無効化

# sed -i s/^AllowZoneDrifting=.*/AllowZoneDrifting=no/ /etc/firewalld/firewalld.conf

・NFSのマウントを無効化
leappでは、NFSをサポートしていないので、leapp実施中はマウントを無効化する。

アップグレード

# leapp upgrade
# reboot

[/var/log/leapp/leapp-report.txt]に出力された「Errors」「Inhibitors」の指摘内容やログを確認して対応

対応例

・競合されていると思われるパッケージのパッケージの削除

# dnf remove valgrind

エラー内容

    warning: Found bdb_ro Packages database while attempting sqlite backend: using bdb_ro backend.
    warning: Found bdb_ro Packages database while attempting sqlite backend: using bdb_ro backend.
    Error: Transaction test error:
      file /usr/share/man/man1/callgrind_annotate.1.gz from install of valgrind-1:3.23.0-4.el9.x86_64 conflicts with file from package valgrind-docs-1:3.22.0-3.el8_10.x86_64
      file /usr/share/man/man1/callgrind_control.1.gz from install of valgrind-1:3.23.0-4.el9.x86_64 conflicts with file from package valgrind-docs-1:3.22.0-3.el8_10.x86_64
      file /usr/share/man/man1/cg_annotate.1.gz from install of valgrind-1:3.23.0-4.el9.x86_64 conflicts with file from package valgrind-docs-1:3.22.0-3.el8_10.x86_64
      file /usr/share/man/man1/cg_diff.1.gz from install of valgrind-1:3.23.0-4.el9.x86_64 conflicts with file from package valgrind-docs-1:3.22.0-3.el8_10.x86_64
      file /usr/share/man/man1/cg_merge.1.gz from install of valgrind-1:3.23.0-4.el9.x86_64 conflicts with file from package valgrind-docs-1:3.22.0-3.el8_10.x86_64

アップグレード結果の確認

OSのバージョンや、ログにエラーが出力されていないか確認

# cat /etc/redhat-release
# cat /etc/os-release
# rpm -qa | grep el8
# cat /var/log/leapp/leapp-report.txt
# cat /var/log/leapp/leapp-upgrade.log

###パッケージのチェック
OSを最新の状態に更新
```bash
# dnf update --allowerasing
# dnf update

不要なパッケージの削除

# rpm -qa | grep el8
# rpm -qa|grep leapp

上記で抽出したパッケージを削除
# dnf remove <パッケージ名>

参考URL

ELevating CentOS 7 to AlmaLinux 9 | AlmaLinux Wiki
CentOS Linux 7のサポート終了にインプレースアップグレードで対処した話 – アルファテックブログ

コメントを残す

メールアドレスが公開されることはありません。 が付いている欄は必須項目です