Configure the DVD or Linux ISO as software repository for Red Hat Enterprise Linux

You downloaded and installed Red Hat Enterprise Linux on your server becasue you just want to test it out. During installation you selected base server, after installation you realize that you need to install additional packages. But since you did not purchase the Red Hat license it is not possible to install additional packages or even remove packages. By default the server tries to connect to ftp.redhat.com to install/remove packages after installation. Without a valid license yum install/remove will fail upon connection to the ftp server. To get around the issue you can use the installation ISO or DVD as a software repository.

Configure the repository file
The first thing to do is to configure the DVD as a software repositoy. You can modify the existing configuration file /etc/yum.repos.d/rhel-source.repo by adding the below lines.

[rhel-CD-source]
name=CD Red Hat ISO
baseurl=file:///media/dvd
enable=1
gpgcheck=0

Or put the above lines into a new file called /etc/yum.repos.d/dvd.repo. The name of the file is not important, it just needs to have the extension .repo.

Mount the DVD

mkdir /media/dvd

Make a directory where you will mount the DVD, /media/dvd will do just fine. Typically the first DVD or CD drive is /dev/sr0, you will need to mount the dvd drive before you can read from it.

mount /dev/sr0 /media/dvd

The DVD is now mounted and redable. It has also been configured as a software repository. You should be able to issue the command yum update or yum install and even yum remove.

About Andrew Lin

Hi, I have always wanted to creat a blog site but never had the time. I have been working in Information Technology for over 15 years. I specialize mainly in networks and server technologies and dabble a little with the programming aspects. Andrew Lin

View all posts by Andrew Lin →