Account Links: Cart | Register | Log In

Skip to content

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

How do I configure the yum local repository to be able to access a DVD ISO via HTTP?

Article ID: 7228 - Created on: May 11, 2008 6:00 PM - Last Modified:  May 12, 2008 6:00 PM

Steps:

 

  1. Copy Red Hat Enterprise Linux 5 DVD ISO RHEL5-Client-20070208.0-i386-DVD.iso from Red Hat Network and create a local repository on the local Repository server. 

    
     #mkdir -p /var/www/html/cdrom/iso
     #mount -o loop /RHEL5-Client-20070208.0-i386-DVD.iso
     /var/www/html/cdrom/iso
     #cd /var/www/html/cdrom
     #createrepo .
     #yum clean all
     Created 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
     

     

  2. Share with httpd: 

    
     # vi /etc/httpd/conf/httpd.conf
     ServerAdmin root@10.65.6.141
     DocumentRoot /var/www/html
     ServerName 10.65.6.141
     

    (Where 10.65.6.141 is the local Repository server)
     
     

    
     # httpd -t
     # service httpd start
     

     

  3. Client side configuration: 

    
     vi /etc/yum.repos.d/my.repo
     ----
     [RH51-Server]
     name= RHEL 5.1 Server Repository
     baseurl=http://10.65.6.141/cdrom
     enabled=1
     ----
     

     

  4. Verify from client: 

    
     # yum list
     Loading "installonlyn" plugin
     Setting up repositories
     Reading repository metadata in from local files
     Available Packages
     Deployment_Guide-as-IN.noarch 5.0.0-19
     RH51-Server Deployment_Guide-bn-IN.noarch
     5.0.0-19 RH51-Server
     Deployment_Guide-de-DE.noarch 5.0.0-19
     RH51-Server Deployment_Guide-en-US.noarch
     5.0.0-19 RH51-Server
     Deployment_Guide-es-ES.noarch 5.0.0-19
     RH51-Server Deployment_Guide-fr-FR.noarch
     5.0.0-19 RH51-Server ========
     OR
     # yum update
     

    The package version used on the Repository server:
     
    httpd-2.2.3-11.el5yum-3.0.1-5.el5createrepo-0.4.4-2.fc6The package version used on the client side:
     
    yum-3.0.1-5.el5 Bugzilla:
     
    https://bugzilla.redhat.com/show_bug.cgi?id=217227 https://bugzilla.redhat.com/show_bug.cgi?id=212180 Knowledgebase Article:
     
    How would I use yum to update or install packages from a ISO of Red Hat Enterprise Linux version 5?

 

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 ...