RHEL_8-配置yum、dnf源
创建挂载目录
mkdir -p /media/cdrom
挂载目录
umount /dev/sr0
mount /dev/cdrom /media/cdrom
mount /dev/hdc /media/cdrom
mount /dev/scd0 /media/cdrom
mount /dev/sr0 /media/cdrom
df -h
新建repo文件
cd /etc/yum.repos.d/
mkdir -p /etc/yum.repos.d/bak
mv -f /etc/yum.repos.d/*.repo /etc/yum.repos.d/bak
cat <<END > /etc/yum.repos.d/weizhi.repo
[Local_AppStream]
name=Local_AppStream
baseurl=file:///media/cdrom/AppStream
enabled=1
gpgcheck=0
[Local_BaseOS]
name=Local_BaseOS
baseurl=file:///media/cdrom/BaseOS
enabled=1
gpgcheck=0
END
确认源创建成功
yum clean all
yum makecache
dnf makecache
yum repolist
dnf repolist