In Order to install or Update software in RHEL we need to connect to RHN (RedHat Network). By creating Local Repository we can install software from our own device. It saves things like bandwidth and time. All we need is an iso image (CD/DVD image).
Download the iso file from redhat.com and place it in /iso directory
To Create a local repository; create a configuration file in /etc/yum.repos.d/ as *.repo
name=This is Local Repository
In this configuration file we have defined the repo url as a file and it is in /localrepo.
But in order to access that, we have to mount the iso file to that directory.
mount -o loop,ro /iso/rhel7.iso /localrepo
But this mount is not persistent, for persistent mount we have to edit the /etc/fstab file
/iso/rhel7.iso /localrepo iso9660 loop,ro 0 0
then verify whether you have access to the local repository by giving a command
Now install package and play with the services