Red Hat - The world's leading enterprise Linux platform

mail

How to install software on RHEL with the install DVD only ?

Notes about the context

yum and repositories

Whatever the packages are local or remote, you'll need :

Let's do it

Get the packages

  1. place the ISO image into the virtual drive
  2. mount it :
    mount /dev/sr0 /mnt/cdrom
  3. you'll notice the DVD content is like :
    [DVD root]
    	AppStream
    		Packages
    			[lots of RPMs]
    		repodata
    			repomd.xml
    	BaseOS
    		Packages
    			[lots of RPMs]
    		repodata
    			repomd.xml
    What's subtle here is that AppStream and BaseOS are 2 distinct repositories, and both need to be declared.
  4. The metadata of each repository can be found in repoName/repodata/repomd.xml

Declare repositories

For each of these repositories, create a configuration file : /etc/yum.repos.d/myRepo
The file name doesn't matter : use anything you like as long as it's meaningful to you.
[myRepo]			name of this repo when listing yum sources : cosmetics only
name=DVD for RHEL 		just a description, doesn't matter much
mediaid=None
metadata_expire=-1
gpgcheck=1			to be used with gpgkey below
cost=500
enabled=1
baseurl=file:///mnt/cdrom/BaseOS	the 2nd repo file will point to /mnt/cdrom/AppStream
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release	make sure this is the right path (or disable gpgcheck to go quick'n'dirty)

Refresh yum sources

  1. yum clean all
  2. yum repolist enabled
    This should list the 2 new repositories.
  3. yum update

And finally : install !

Nothing more than :
yum install somePackage