创建目录,挂载iso镜像
mkdir /media/iso
mount /dev/cdrom /media/iso
备份源
cd /etc/yum.repos.d
cp rocky.repo rocky.repo.bak
cp rocky-extras.repo rocky-extras.repo.bak
创建镜像源
cat media/iso/media.repo > /etc/yum.repos.d/media.repo
编辑镜像源
[InstallMedia-AppStream]
name=Rocky Linux 9.2
baseurl=file:///media/iso/AppStream
gpgcheck=0
enabled=1
[InstallMedia-BaseOS]
name=Rocky Linux 9.2
baseurl=file:///media/iso/BaseOS
gpgcheck=0
enabled=1
标签:rockylinux9.2,media,BaseOS,repo,iso,本地,镜像,rocky
From: https://www.cnblogs.com/kingslayermeto/p/18181690