?
Solved

Problem creating local yum repository on stand-alone RHEL5 server

Posted on 2010-09-20
2
Medium Priority
?
792 Views
Last Modified: 2013-12-06
I have a totally isolated server running RHEL5 i.e. no internet connection.

I have downloaded from RHN all the latest upgraded rpm's and put them in a directory on the server e.g /data/patches/20100915/rpm-packages

I then used :
  createrepo --database /data/patches/20100915/rpm-packages

This then created a subdirectory called repodata with all the metadata files in it.

I then created a new repository file in /etc/yum.repos.d  as follows :

[rhel-Updates]
name=Red Hat Enterprise Linux 5 - i386
baseurl=file://data/patches/20100915/rpm-packages/
enabled=1
gpgcheck=0
gpgkey=

When I run yum update it comes back with an error saying that it cannot find
     /data/patches/20100915/rpm-packages/repodata/repomd.xml
yet when I check the location the file exists.

I am fairly new to linux and RHEL5 so any help with setting up a local repository would be gratefully appreciated.
0
Comment
Question by:madsumo
2 Comments
 
LVL 81

Expert Comment

by:arnold
ID: 33719518
you need to run it as localinstall
yum --localinstall update /path/to/files/packages
yum update --localinstall pacakge.rpm package2.rpm etc.

0
 

Accepted Solution

by:
madsumo earned 0 total points
ID: 33733624
Thanks for your suggestion Arnold but unfortunately I got errors when trying to use the switch --localinstall.

In the end I persevered with setting up a local repository and found that it the repo file I created was missing a ' / ' in the baseurl= line

 i.e. I originally had  ' baseurl = file://data/redhat-packages '
     
      but changed it to
       
       ' baseurl = file:///data/redhat-packages '

This then worked fine.
 
0

Featured Post

Configuration Guide and Best Practices

Read the guide to learn how to orchestrate Data ONTAP, create application-consistent backups and enable fast recovery from NetApp storage snapshots. Version 9.5 also contains performance and scalability enhancements to meet the needs of the largest enterprise environments.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I. Introduction There's an interesting discussion going on now in an Experts Exchange Group — Attachments with no extension (http://www.experts-exchange.com/discussions/210281/Attachments-with-no-extension.html). This reminded me of questions tha…
I have written articles previously comparing SARDU and YUMI.  I also included a couple of lines about Easy2boot (easy2boot.com).  I have now been using, and enjoying easy2boot as my sole multiboot utility for some years and realize that it deserves …
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
Suggested Courses
Course of the Month16 days, 3 hours left to enroll

850 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question