RedHat 7 – Setup locally mounted CD/DVD/ISO as yum repository

1. Mount the disk to /media folder
2. copy media.repo from the root of the disk to /etc/yum.repos.d/ and set permission to 644
3. edit the media.repo changing gpgchedk from 0 to 1 and adding the following lines:

enabled=1
baseurl=file:///media/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release

4. Clear caches:
yum clean all
subscription-manager clean

5. list and update yum

yum list
yum update

Leave a Reply

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

nineteen − fourteen =

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