《OpenShift 4.x HOL教程汇总》
已在 RHEL 8.4 上验证
文章目录
挂载 iso
- 挂载RHEL8的ISO文件rhel-8.4-x86_64-dvd.iso。
$ mkdir /mnt/rhel8
$ mount /path/to/rhel-8.4-x86_64-dvd.iso /mnt/rhel8 -o loop
- 确认已经挂载成功。
$ ll /mnt/rhel8
total 48
dr-xr-xr-x. 4 root root 2048 May 4 03:21 AppStream
dr-xr-xr-x. 4 root root 2048 May 4 03:21 BaseOS
dr-xr-xr-x. 3 root root 2048 May 4 03:21 EFI
-r--r--r--. 1 root root 8154 May 4 03:19 EULA
-r--r--r--. 1 root root 1455 May 4 03:19 extra_files.json
-r--r--r--. 1 root root 18092 May 4 03:19 GPL
dr-xr-xr-x. 3 root root 2048 May 4 03:21 images
dr-xr-xr-x. 2 root root 2048 May 4 03:21 isolinux
-r--r--r--. 1 root root 103 May 4 03:19 media.repo
-r--r--r--. 1 root root 1669 May 4 03:19 RPM-GPG-KEY-redhat-beta
-r--r--r--. 1 root root 5134 May 4 03:19 RPM-GPG-KEY-redhat-release
-r--r--r--. 1 root root 1796 May 4 03:21 TRANS.TBL
配置 yum repo
- 创建repo文件
$ cat << EOF > /etc/yum.repos.d/rhel.repo
[rhel8-baseos]
name=rhel8-baseos
baseurl=file:///mnt/rhel8/BaseOS
gpgcheck=0
enabled=1
[rhel8-appstream]
name=rhel8-appstream
baseurl=file:///mnt/rhel8/AppStream
gpgcheck=0
enabled=1
EOF
- 确认 repolist。
$ dnf repolist
Updating Subscription Management repositories.
Unable to read consumer identity
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
repo id repo name
rhel8-appstream rhel8-appstream
rhel8-baseos rhel8-baseos