Redhat – How-to: add an ISO/DVD of RHEL to the Repository list under Gnome for installing packages

package-managementredhatrepositoryrhel5yum

I want to add the original ISO I installed RHEL from as a repository under the Add/Remove Software tool in Gnome.

How do I do this?

To clarify, I know what I need to do (add a repository) – I need the how. I have been unsuccessful in determining the correct string to put in the location field in the Gnome applet. Currently I have file:///media/rhel/Server/repodata. I have tried pointing directly to the XML file in that directory, the parent directory, its parent, and in variations with more and less slashes in the path.

Update: I found http://www.cyberciti.biz/tips/redhat-centos-fedora-linux-setup-repo.html, which has directions for creating the repository manually – but I don't see why this should be needed if the repomd.xml file is already on the DVD.

Best Answer

Hey after searching around I was able to find a better understanding answer to this problem.

Make a mount point for your iso:

mkdir /mnt/pen

Mount the OS installation iso like normal:

mount -o loop rhel.iso /mnt/pen/

Create a details entry for your repository (add a file in the /etc/yum.repos.d directory e.g. rhel.repo):

[rhel-cd]

name=Red Hat OS CD

baseurl=file:///mnt/pen/Server

enabled=1

gpgcheck=0

Clean your cache:

yum clean all

You should now have your repository visible in Add/Remove Programs.

NOTE: You might want to consider automounting your iso.

Related Topic