Solved

Problem creating local yum repository on stand-alone RHEL5 server

Posted on 2010-09-20
2
787 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 78

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

Secure Your Active Directory - April 20, 2017

Active Directory plays a critical role in your company’s IT infrastructure and keeping it secure in today’s hacker-infested world is a must.
Microsoft published 300+ pages of guidance, but who has the time, money, and resources to implement? Register now to find an easier way.

Question has a verified solution.

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

Suggested Solutions

SSH (Secure Shell) - Tips and Tricks As you all know SSH(Secure Shell) is a network protocol, which we use to access/transfer files securely between two networked devices. SSH was actually designed as a replacement for insecure protocols that sen…
Google Drive is extremely cheap offsite storage, and it's even possible to get extra storage for free for two years.  You can use the free account 15GB, and if you have an Android device..when you install Google Drive for the first time it will give…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

730 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