RHEL 8 - 配置基于安装 ISO 文件的 YUM Repo

12 篇文章 1 订阅

OpenShift 4.x HOL教程汇总
已在 RHEL 8.4 上验证

挂载 iso

  1. 挂载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
  1. 确认已经挂载成功。
$ 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

  1. 创建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
  1. 确认 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
  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值