Smoothwall Firewall project

Thursday 4 June 2009

Using a Redhat Enterprise DVD iso as your repository




If you work with a lot of secure systems as I do, it is not always possible to have a direct connection to the Internet or indeed one at all. Now with Redhat Enterprise Linux this can be an issue, as you effectively lose access to the Add/Remove function of the operating system, so here is a way around the problem.



First we need to mount the iso image of the version of RHEL you have installed to a loopback device. You can do this simply from the command line, or if you are going to do this alot, you are better off putting the mount statement in your /etc/fstab file, look at the pictures for the syntax.

Once this is mounted on the directory you are going to use, you need to add a new repository file in the /etc/yum.repos.d directory, lets call it rhel-iso.repo, and again this is shown in detail in the picture. If you use the same directories as I have , then this will cause you less hassle when you try it.

Once you have added this file, and checked the iso has been mounted you need to set up yum, so firstly do this:

yum clean all

and then

yum update


The results should look like this:



You are now ready to go, so that when you click on Add/Remove software you will get a screen like this:



The only thing left to do is get the iso to automount, now if you look at the screen grab above, you will see that I'm using the mount -a command in the Gnome autostart sessions screen. You can do this in other ways, but as I'm going to be using the GUI, this works perfectly.

Voila, you now have full access to the RHEL 5 DVD/iso so you can install software once the server has been put in a cage, far from the rest of the Planet. You can also carry the iso around on your USB stick and use this technique when you need to install software.

1 comment:

R Srijith said...

I have explained how to do the same in my blog. Check it out - http://blog.sriunplugged.com/uncategorized/adding-redhat-dvd-as-repository/