Adding RHEL DVD as Repository

Perform the next steps to add RHEL installation DVD as repository.

Step 1: Create mount point and mount the DVD

$ mkdir /mnt/rhel-dvd && mount -t iso9660 -o ro /dev/cdrom /mnt/rhel-dvd

Step 2: Create RHEL repo list and call it ‘rhel-dvd.repo’

$ touch /etc/yum.repos.d/rhel-dvd.repo

Step 3: Add the following config to ‘rhel-dvd.repo’

[rhel-dvd]
name=Red Hat Enterprise Linux $releasever - $basearch - DVD
baseurl=file:///mnt/rhel-dvd/
enabled=1
gpgcheck=0

Step 4: Clean your cache

$ yum clean all

Now you can install the new software from the DVD using ‘yum install’ command.