Package management in Linux is very important thing to know. You must know how you can install, remove and upgrade packages. But before that you must have an active repository on the system. Let's we have a RHEL8 system, So we can have either a RedHat Subscription to have repo or we can create a local repo using ISO image. Here we will see how we can create a local repo in RHEL8.
In RHEL8, we have two package repositories.
BaseOS Application Stream
BaseOS repository have all OS packages where as Application Stream has all application related packages.
Below are the steps to create a local repo using ISO. First thing is that mount an connected ISO to your machine.
# mount /dev/cdrom /mnt
or
# mount -o loop /home/my-is-image.iso /mnt (If you have ISO on system)
Create a directory named /repo and copy all content of /mnt in it.
# cp -a /mnt/* /repo/
Now create a .repo file in /etc/yum.repos.d/ with below details.
Excellent