Creating a Local Yum Repository Using an ISO Image

# mkdir -p /mnt/OSimage/OL7.4_x86_64
# mount -o loop,ro /media/V921569-01.iso /mnt/OSimage/OL7.4_x86_64
/media/V921569-01.iso /mnt/OSimage/OL7.4_x86_64 iso9660 loop,ro 0 0
[OL74]
name=Oracle Linux 7.4 x86_64
baseurl=file:///mnt/OSimage/OL7.4_x86_64
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY
gpgcheck=0 
enabled=1

Clean up the yum cache.

# yum clean all

Test that you can use yum to access the repository.

# yum repolist
Loaded plugins: refresh-packagekit, security
...
repo id                          repo name                                status
OL74                             Oracle Linux 7.4 x86_64                  25,459
repolist: 25,459