LINUX – Using Local YUM REPO on RedHat 7 using DVD ISO

Often I need to install packages that are on the RHEL install DVD and being able to use the install ISO without having a Red Hat subscription or license is extremely useful.

  • Mount the DVD to cdrom folder
mkdir /cdrom
 mount /dev/cdrom /cdrom
  • Create yum local repo file:
cd /etc/yum.repos.d
 vi local.repo

and past this content:

[LocalRepo]
 name=Local Repository
 baseurl=file:///cdrom
 enabled=1
 gpgcheck=1
 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release

save the file and clean yum repository cache:

yum clean all

Job done.

Leave a Reply

Your email address will not be published. Required fields are marked *

14 − 4 =

This site uses Akismet to reduce spam. Learn how your comment data is processed.