Account Links: Cart | Register | Log In

Skip to content

Red Hat Knowledgebase
Red Hat Knowledgebase Search
Article translations:
Currently Being Moderated

How would I use yum to update or install packages from a ISO of Red Hat Enterprise Linux version 5?

Article ID: 9893 - Created on: Apr 26, 2007 6:00 PM - Last Modified:  Apr 26, 2007 6:00 PM

Release found: Red Hat Enterprise Linux 5

 

Resolution:

In order to use yum to install or update packages from an iso file, follow the steps below: -

 

  1. Create directories to mount the iso file. 

    
     #mkdir -p /cdrom/iso
     

     

  2. Mount the iso as loopback device. 

    
     #mount -o loop <iso-name> /cdrom/iso
     

    Replace <iso-name> with the iso file.

  3. Create a repository. The createrepo package needs to be installed on the system in order to run the following commands. createrepo is an optional package and is not installed by default. 

    
     #cd /cdrom
     #createrepo .
     #yum clean all
     

     

  4. Create a file /etc/yum.repos.d/file.repo as follows: 

    
     #cat /etc/yum.repos.d/file.repo
     [RHEL 5 Repository]
     baseurl=file:///cdrom
     enabled=1
     

     

 

Running yum should now work with the iso file as the source.

Tags: rhel5
Feedback from users like yourself is a critical factor in helping us make the Red Hat Knowledgebase as useful as possible.

More Like This

  • Retrieving data ...