Skip to content.

Scientific Linux

Personal tools
You are here: Home » Documentation » How To » How to change Yum to point to my repository

How to change Yum to point to my repository

Scientific Linux was designed so that users could easily change where their machines get their nightly updates. There are a few things that need to be pointed out.
/etc/cron.daily/yum.cron: The nightly yum.cron (also known as autoyum) uses the same repository configurations as when you use yum manually. So if you have a yum repository enabled, the yum.cron is going to use that repository for updates.
/etc/yum.conf: The yum.conf file is used for the global settings of yum.
/etc/yum.repos.d/: This directory is where all the yum repositories are held. They generally are one repository per file, although more than one repository can be defined in each file.

Just Edit The Files

  • /etc/yum.repos.d/sl.repo
  • /etc/yum.repos.d/sl-errata.repo
  • Any other files in /etc/yum.repos.d/ that are enabled by default. To list them do
    grep enabled=1 /etc/yum.repos.d/*

Customize yum-conf rpm

Scientific Linux has two yum rpm's. yum and yum-conf. This initially was so that yum could be upgraded without touching the configuration files. But it also allows people to completely change their yum-conf to point to wherever they wish.

Steps to customize your yum-conf rpm.
For the example we'll assume this is for release 4.3

  1. Get the yum-conf src rpm. Get the appropriate rpm for your distribution
  2. install the src.rpm and untar the source
    rpm -Uvh yum-conf-43-4.SL.src.rpm
    cd /usr/src/redhat/SOURCES/
    tar xfz yum-conf-43.tar.gz
  3. Edit the appopriate files. Changing them to point to your machines.
  4. Tar back up the directory
    tar cfz yum-conf-43.tar.gz yum-conf-43
  5. cd to the spec directory
    cd /usr/src/redhat/SPECS/
  6. Edit the spec file. Change the release to something appropriate
    vi yum-conf-sl43.spec
  7. Build your rpm
    rpmbuild -ba yum-conf-sl43.spec

Created by dawson
Last modified 2009-03-09 10:44 AM

Powered by Plone

This site conforms to the following standards: