Solved

Problem creating local yum repository on stand-alone RHEL5 server

Posted on 2010-09-20
2
782 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 76

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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Introduction We as admins face situation where we need to redirect websites to another. This may be required as a part of an upgrade keeping the old URL but website should be served from new URL. This document would brief you on different ways ca…
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…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…

708 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now