Problem creating local yum repository on stand-alone RHEL5 server

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 :

name=Red Hat Enterprise Linux 5 - i386

When I run yum update it comes back with an error saying that it cannot find
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.
Who is Participating?
madsumoConnect With a Mentor Author Commented:
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.
you need to run it as localinstall
yum --localinstall update /path/to/files/packages
yum update --localinstall pacakge.rpm package2.rpm etc.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.