Article

santoshmohan's picture
article
Reads:

12876

Score:
5
5
1
 
Comments:

2

Set Up A Local YUM Repository

Author Info

27 June 2008 - 2:06pm
Submitted by: santoshmohan

Tags

(View Disclaimer)

By Sreehari Cheerla, Santosh M

Yellowdog Updater Modifier (YUM) is an automatic updater and package installer/remover for rpm systems. It automatically computes dependencies and figures out what things should occur to install packages. It makes it easier to maintain groups of machines without having to manually update each one using rpm.

Features include:

  • Multiple Repositories
  • Correct dependency calculation
  • Fast operation
  • rpm-consistent behavior

YUM makes it easy to keep the systems in a network running with the latest patches. If your network has multiple machines that need to be updated, you may want to run a local YUM server that caches the updates.

Setting up a local YUM Repo server is a simple process and can be done quickly. You'll need to:

  • Set up the local YUM Repo server
  • Set up clients to pull updates from the local YUM Repo server

Set Up The Local YUM Repo Server

Setting up the local YUM Server requires the following steps:

  1. Install and Configure Apache to support YUM
  2. Install Create Repo
  3. Configure the YUM Server

Install and Configure Apache to support YUM:

  1. Install Apache Using YAST and start the Apache service using “rcapache2 start”
  2. Create a symbolic link of the location which needs to be hosted or where Updates available under /srv/www/htdocs .

    Eg : ln -s /Updates /srv/www/htdocs

  3. Configure Apache in order to support as YUM source by editing /etc/apache2/default-server.conf file. Add the following content to this file and restart Apache.
    <Directory "/var/www/html">
         Options None
         AllowOverride None
         Order allow,deny
         Allow from all
    </Directory>
    <IfDefine SSL>
         SSLEngine off
    </IfDefine>
  4. Restart Apache
    /etc/init.d/apache2 restart
  5. Note: If Port 80 is already in use, change the port number in /etc/apache2/listen.conf, eg: Listen 800

Install Create Repo:

Install createrepo rpm by downloading from http://rpmfind.net

Configure the YUM Server:

  1. Copy the updates to a folder (Eg: /Updates/SLES10, /Updates/SLED10,/SLES10-SP1, /Updates/SLED10-SP1). Place all updates under similar folder structure.
  2. Run the below command

    createrepo <DIRNAME>
    Eg: createrepo /Updates

    This would generate required meta data.

Set Up Clients To Pull Updates From The Local YUM Repo Server

To configure a client system to pull updates from the local YUM server Using rug command follow below steps:

  1. Add the service using rug service add command Using “rug sa <servername> -t yum <servicename >”
    rug sa http://164.99.98.45/Updates -t yum updates
  2. Verify the Catalogs using “rug ca” command and Subscribe the catalog using “rug sub <catalogname>”
  3. Now Update the software using “rug up” command .

Disclaimer: As with everything else at Cool Solutions, this content is definitely not supported by Novell (so don't even think of calling Support if you try something and it blows up).

It was contributed by a community member and is published "as is." It seems to have worked for at least one person, and might work for you. But please be sure to test, test, test before you do anything drastic with it.




User Comments

peterhine's picture

missed step(s) ?

Submitted by peterhine on 30 June 2008 - 1:19am.

"Copy the updates to a folder (Eg: /Updates/SLES10, /Updates/SLED10,/SLES10-SP1, /Updates/SLED10-SP1). Place all updates under similar folder structure."

where did the updates come from in the first place ?

what method or tool do we use to keep this repo up to date ?

after updating the repo, does "createrepo " need to be rerun ?

may i suggest using "http://software.opensuse.org/search" instead of rpmfind. search under "sled/sles 10" category.

thanks
Peter

Anonymous's picture

Configuring repository

Submitted by Anonymous on 21 October 2008 - 12:44am.

How can we do to make some important packages updates first and then later the rest of packages? I don't want all the updates simultaneity. It's possible?

© 2013 Novell