This is the procedure for creating a repository from the installation media when installing a package.
Mount the media.
# mount /dev/cdrom /media
Creating / editing repository files
# vi /etc/yum.repos.d/dvd.repo [dvd] name=dvd baseurl=file:///media /gpgcheck=1 enabled=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
Make sure it is recognized as a repository.
# yum repolist Loaded plugin:product-id, search-disabled-repos, subscription-manager This system is not registered with an entitlement server. You can use subscription-manager to register. Repository ID Repository name Status !dvd dvd 4,986