This is going to make things very convenient when you need to install packages and you cannot find the ISO or the install media.
Or, when you want to install a package but there are dependencies and you cannot figure out which one to install first.
YUM makes it very easy. But what if your server do not have internet access?
Mount the OS ISO file.
Create "/apps/repository" folder.
Copy "<DVD>/repodata" and "<DVD>/Packages" to /apps/repository
Copy "<DVD>/media.repo" to "/etc/yum.repos.d" folder.
Update the "/etc/yum.repos.d/media.repo" file as below.
You can unmount the ISO and will not need it anymore for installing packages.
Add lines below.
It will look like below.
name=Red Hat Enterprise Linux 6.1
Make this media.repo file read-only.
Then run "yum repolist"
It will return the following
[root@rhel61 Desktop]# yum repolist
Loaded plugins: product-id, refresh-packagekit, subscription-manager
Updating Red Hat repositories.
repo id repo name status
InstallMedia Red Hat Enterprise Linux 6.1 3,480