Solved

Problem creating local yum repository on stand-alone RHEL5 server

Posted on 2010-09-20
2
784 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 77

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

Ransomware: The New Cyber Threat & How to Stop It

This infographic explains ransomware, type of malware that blocks access to your files or your systems and holds them hostage until a ransom is paid. It also examines the different types of ransomware and explains what you can do to thwart this sinister online threat.  

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Linux Mint 18 31 90
php ssh2_scp_send 1 61
Installing VirtualBox in Fedora 25 Linux 2 336
Ubunto LTS Server 16.04 for Intel Processors 2 43
This document is written for Red Hat Enterprise Linux AS release 4 and ORACLE 10g.  Earlier releases can be installed using this document as well however there are some additional steps for packages to be installed see Metalink. Disclaimer: I hav…
1. Introduction As many people are interested in Linux but not as many are interested or knowledgeable (enough) to install Linux on their system, here is a safe way to try out Linux on your existing (Windows) system. The idea is that you insta…
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.:
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

773 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