光盘挂载及对应yum仓库安装
//挂载
[root@localhost dev]# mount sr0 /mnt
mount: /mnt: /dev/sr0 already mounted on /run/media/xiaohg/RHEL-8-0-0-BaseOS-x86_64.
//查看挂载目录 /mnt/
[root@localhost dev]# cd /mnt/
[root@localhost mnt]# ls
AppStream BaseOS EFI EULA extra_files.json GPL images isolinux media.repo RPM-GPG-KEY-redhat-beta RPM-GPG-KEY-redhat-release TRANS.TBL
//yum仓库指定
[root@localhost mnt]# cd /etc/yum.repos.d/
[root@localhost yum.repos.d]# ls
redhat.repo
[root@localhost yum.repos.d]# vim redhat.repo
[root@localhost yum.repos.d]# cat redhat.repo
#
# Certificate-Based Repositories
# Managed by (rhsm) subscription-manager
#
# *** This file is auto-generated. Changes made here will be over-written. ***
# *** Use "subscription-manager repo-override --help" if you wish to make changes. ***
#
# If this file is empty and this system is subscribed consider
# a "yum repolist" to refresh available repos
#
[iso1]
name = iso1
baseurl = file:///mnt/BaseOS
gpgcheck = 0
[iso2]
name = iso2
baseurl = file:///mnt/AppStream
gpgcheck = 0
//加载yum仓库
[root@localhost yum.repos.d]# yum 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.
iso1 33 MB/s | 2.2 MB 00:00
iso2 48 MB/s | 5.3 MB 00:00
Last metadata expiration check: 0:00:01 ago on Sat 07 Nov 2020 02:50:48 AM EST.
repo id repo name status
iso1 iso1 1,658
iso2 iso2 4,672
做完上述所有操作后就可以直接可以使用指定的yum仓库进行软件安全了;