1 挂载光盘
mount /dev/sr0 /mnt
2 编辑配置文件(.repo)
cp /mnt/media.repo /etc/yum.repos.d/wl.repo
vim /etc/yum.repos.d/wl.repo
需要注意的是8.0版本有2个Packages分别在/mnt/AppStream/和/mnt/BaseOS/下,所以需要配置2个
配置文件内容:
[InstallMedia]
name=Red Hat Enterprise Linux 8.0.0
mediaid=None
metadata_expire=-1
gpgcheck=1
gpgkey=file:///mnt/RPM-GPG-KEY-redhat-release
baseurl=file:///mnt/AppStream/
enable=1
cost=500
[InstallMedia_OS]
name=Red Hat Enterprise Linux 8.0.0
mediaid=None
metadata_expire=-1
gpgcheck=1
gpgkey=file:///mnt/RPM-GPG-KEY-redhat-release
baseurl=file:///mnt/BaseOS/
enable=1
cost=500
3 检测是否配置成功【看到自己命名的InstallMedia_OS 和InstallMedia 】 说明成功了
yum list