rocky8离线环境-本地配置yum源
配置应该和Centos7差不多,就做个笔记
操作
# 创建挂载文件夹:
mkdir /mnt/cdrom
# 创建备份yum配置文件夹:
mkdir bak.repo
# Rocky- 到备份文件夹:
mv Rocky-* ./bak.repo/
# 配置本地rocky.repo 配置
vi /etc/yum.repos.d/rocky.repo
#修改的内容
[baseos]
name=Rocky Linux $releasever - BaseOS - Debug
baseurl=file:///mnt/cdrom/BaseOS/
gpgcheck=0
enabled=1
#如果启用yum源校验,还需要输入一行gpgkey的内容,一般情况下不需要校验,如果有需要,自己添加一行)
[AppStream]
name=Rocky Linux $releasever - BaseOS - Source
baseurl=file:///mnt/cdrom/AppStream/
gpgcheck=0
#修改的内容
# 临时挂载yum源
[root@localhost ~]# mount -o loop Rocky-8-latest-x86_64-dvd.iso /mnt/cdrom
mount: /mnt/cdrom: WARNING: device write-protected, mounted read-only.
# 检查是否成功挂载
dnf list
#yum list