Feature Article

Set Up A Local YUM Repository

Author Info

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

Tags

feature
Reads:

1710

Score:
5
5
1
 
Comments:

1

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 .

Author Info

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

Tags




User Comments

Post new comment

  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <p> <a> <em> <i> <cite> <code> <img> <ul> <ol> <li> <div> <dl> <dt> <dd> <b> <strong> <h1> <h2> <h3> <pre> <table> <td> <tr> <th> <blockquote>
  • Lines and paragraphs break automatically.
  • Glossary terms will be automatically marked with links to their descriptions. If there are certain phrases or sections of text that should be excluded from glossary marking and linking, use the special markup, [no-glossary] ... [/no-glossary]. Additionally, these HTML elements will not be scanned: a, abbr, acronym, code, pre.

More information about formatting options

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
16 + 3 =
Solve this simple math problem and enter the result. E.g. for 1+3, enter 4.

© 2008 Novell, Inc. All Rights Reserved.