#挂载系统光驱
[root@localhost ~]# mount /dev/cdrom /mnt/
#编辑yum源配置文件
[root@localhost ~]# vi /etc/yum.repos.d/redhat.repo
[AppStream]
name=Appstream from local DVD
baseurl=file:///mnt/AppStream
enable=1
gpgcheck=0
[BaseOS]
name=BaseOS from local DVD
baseurl=file:///mnt/BaseOS
enable=1
gpgcheck=0