はじめに
RHEl 8.4 で iso ファイルから yum repository を設定したログです。
(PowerVC 2.0.2 の導入の前提作業用の記録です)
環境
OS: RHEL 8.4 (ppc64le, "Server GUI" でインストール。追加パッケージなし)
HW: IBM Power S824
前提:
RHEL 8.4 の Base、Supplement、High Availability 導入の iso ファイルを入手していること
■ OS バージョン確認
# cat /etc/os-release
NAME="Red Hat Enterprise Linux"
VERSION="8.4 (Ootpa)"
ID="rhel"
ID_LIKE="fedora"
VERSION_ID="8.4"
PLATFORM_ID="platform:el8"
PRETTY_NAME="Red Hat Enterprise Linux 8.4 (Ootpa)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:redhat:enterprise_linux:8.4:GA"
HOME_URL="https://www.redhat.com/"
DOCUMENTATION_URL="https://access.redhat.com/documentation/red_hat_enterprise_linux/8/"
BUG_REPORT_URL="https://bugzilla.redhat.com/"
REDHAT_BUGZILLA_PRODUCT="Red Hat Enterprise Linux 8"
REDHAT_BUGZILLA_PRODUCT_VERSION=8.4
REDHAT_SUPPORT_PRODUCT="Red Hat Enterprise Linux"
REDHAT_SUPPORT_PRODUCT_VERSION="8.4"
# uname -a
Linux testvm1 4.18.0-305.el8.ppc64le #1 SMP Thu Apr 29 08:53:15 EDT 2021 ppc64le ppc64le ppc64le GNU/Linux
設定
■ iso ファイルを対象サーバーに配置
当環境では /work 下に配置しています。
# cd /work
# ls -l
total 8510280
-rw-r--r--. 1 root root 42035200 Oct 16 23:18 RHEL-8.4.0-20210503.1-HighAvailability-ppc64le-dvd1.iso
-rw-r--r--. 1 root root 8522346496 Oct 16 23:19 rhel-8.4-ppc64le-dvd.iso
-rw-r--r--. 1 root root 150142976 Oct 16 23:19 supp-supplementary-8.4-rhel-8-ppc64le-dvd.iso
#
■ loop mount を実行
mount 用ディレクトリ作成
# mkdir /media
# mkdir /media/rhel84dvd
# mkdir /media/rhel84-sup-dvd
# mkdir /media/rhel84-ha-dvd
mount を実行
① BaseOS, AppStream
# mount -t iso9660 -o loop /work/rhel/rhel-8.4-ppc64le-dvd.iso /media/rhel84dvd/
# ls -l /media/rhel84dvd/
total 48
dr-xr-xr-x. 4 root root 2048 May 3 15:23 AppStream
dr-xr-xr-x. 4 root root 2048 May 3 15:23 BaseOS
-r--r--r--. 1 root root 8154 May 3 15:19 EULA
-r--r--r--. 1 root root 18092 May 3 15:19 GPL
-r--r--r--. 1 root root 1669 May 3 15:19 RPM-GPG-KEY-redhat-beta
-r--r--r--. 1 root root 5134 May 3 15:19 RPM-GPG-KEY-redhat-release
-r--r--r--. 1 root root 1796 May 3 15:23 TRANS.TBL
dr-xr-xr-x. 3 root root 2048 May 3 15:23 boot
-r--r--r--. 1 root root 1455 May 3 15:19 extra_files.json
dr-xr-xr-x. 2 root root 2048 May 3 15:23 images
-r--r--r--. 1 root root 103 May 3 15:19 media.repo
dr-xr-xr-x. 3 root root 2048 May 3 15:23 ppc
#
② Supplement
# mount -t iso9660 -o loop /work/rhel/supp-supplementary-8.4-rhel-8-ppc64le-dvd.iso /media/rhel84-sup-dvd/
# ls -l /media/rhel84-sup-dvd/
total 44
-r--r--r--. 1 root root 8154 Apr 9 2021 EULA
-r--r--r--. 1 root root 18092 Apr 9 2021 GPL
dr-xr-xr-x. 2 root root 2048 Apr 9 2021 Packages
-r--r--r--. 1 root root 1669 Apr 9 2021 RPM-GPG-KEY-redhat-beta
-r--r--r--. 1 root root 5134 Apr 9 2021 RPM-GPG-KEY-redhat-release
-r--r--r--. 1 root root 1796 Apr 9 2021 TRANS.TBL
-r--r--r--. 1 root root 1455 Apr 9 2021 extra_files.json
-r--r--r--. 1 root root 136 Apr 9 2021 media.repo
dr-xr-xr-x. 2 root root 4096 Apr 9 2021 repodata
#
③ High Availability
# mount -t iso9660 -o loop /work/rhel/RHEL-8.4.0-20210503.1-HighAvailability-ppc64le-dvd1.iso /media/rhel84-ha-dvd
# ls -l /media/rhel84-ha-dvd
total 50
-r--r--r--. 1 root root 8154 May 3 14:26 EULA
-r--r--r--. 1 root root 18092 May 3 14:25 GPL
dr-xr-xr-x. 2 root root 10240 May 3 15:20 Packages
-r--r--r--. 1 root root 1669 May 3 14:25 RPM-GPG-KEY-redhat-beta
-r--r--r--. 1 root root 5134 May 3 14:25 RPM-GPG-KEY-redhat-release
-r--r--r--. 1 root root 1796 May 3 15:20 TRANS.TBL
-r--r--r--. 1 root root 1455 May 3 14:26 extra_files.json
-r--r--r--. 1 root root 116 May 3 15:08 media.repo
dr-xr-xr-x. 2 root root 2048 May 3 15:20 repodata
#
■ yum リポジトリー設定
/etc/yum.repos.d/rhel84_base.repo を作成します。
# cd /etc/yum.repos.d/
# vi rhel84_base.repo
[dvd-BaseOS]
name=RHEL84_BaseOS
baseurl=file:///media/rhel84dvd/BaseOS/
enabled=1
gpgcheck=0
gpgkey=file:///media/rhel84dvd/RPM-GPG-KEY-redhat-release
[dvd-AppStream]
name=RHEL84_AppStream
baseurl=file:///media/rhel84dvd/AppStream/
enabled=1
gpgcheck=0
gpgkey=file:///media/rhel84dvd/RPM-GPG-KEY-redhat-release
[dvd-Supplement]
name=RHEL84_Supplement
baseurl=file:///media/rhel84-sup-dvd
enabled=1
gpgcheck=0
gpgkey=file:///media/rhel84-sup-dvd/RPM-GPG-KEY-redhat-release
[dvd-HA]
name=RHEL84_High_Availability
baseurl=file:///media/rhel84-ha-dvd
enabled=1
gpgcheck=0
gpgkey=file:///media/rhel84-ha-dvd/RPM-GPG-KEY-redhat-release
yum repository 確認
# yum repolist
repo id repo name
dvd-AppStream RHEL84_AppStream
dvd-BaseOS RHEL84_BaseOS
dvd-HA RHEL84_High_Availability
dvd-Supplemen RHEL84_Supplement
4つのリポジトリが使用可能になりました。
以上です。