Site Navigation:
 
 

2. Updating Sources

[Note]DEPRECATED DOCUMENT

This document is no longer supported by the Fedora Documentation Project. One or more of the following situations may have occurred:

  • Changes in Fedora may have made this document inaccurate.

  • A more relevant document may be available.

  • This document may have been subsumed in a different document.

Refer to the revision history for more information.

The Fedora Project lists a number of Web resources which may be trusted and used for your updates. You may need more than one if you plan to download updates at busy times. You may encounter problems if alternatives are not available. The baseurl entry in each of the two sections of yum.conf refers to the main Fedora Project website, http://fedora.redhat.com/releases/fedora-core-$releasever/, and it is very busy. If you perform your updates at the same time as many other users, your feed rates may be very slow, even if you have broadband access. That's why it is important to find a primary server that is geographically close and not too busy.

The list of mirrors at http://fedora.redhat.com/download/mirrors.html lists many alternatives. Choose a few that are local to you, and copy the URLs into a text editor.

Open the file /etc/yum.conf, which contains a list of servers. Look for the section headed [base]. A couple of variables are available for use, indicated by the $ prefix, including releasever and basearch. Using these variables means you don't have to update this file for each new release of Fedora Core. Typically the releasever might be 1, indicating that fedora-core-1 is a good place to look for core updates. The variable basearch might be i386, indicating you are using an Intel family processor. Note that you should not modify these variables; the system does it for you.

Next, check out each of your servers to ensure that when yum is fetching the updates, it looks on the server for the headers directory. For example, http://distro.ibiblio.org/pub/linux/distributions/fedora/linux/core/ gives a URL, but if you follow that URL, you'll find that there is no headers directory present. You will, however, notice a directory entitled 1 which is useful, but only if you are aware of the two blocks in yum.conf. The first is [base] and the next is [updates-released]. The former is the basic Fedora "stock" distribution, while the latter holds updates. Go back to the ibiblio site and find the similarly marked directories: updates and 1. Now you can modify the server URLs that the Fedora Project provides to make them useful for yum.

On http://distro.ibiblio.org/pub/linux/distributions/fedora/linux/core/1/i386/os/, there is a directory called headers/. Scroll down until you find it. This is the directory that should be entered into the [base] section — not the directory containing the headers themselves, but the one that contains the headers/ directory. For example, the URL http://distro.ibiblio.org/pub/linux/distributions/fedora/linux/core/1/i386/os/ is entered in this example.

Now that you have a list of servers, add these to yum.conf to enable yum to find them. First, add the [base] section. The following example provides two feeds for a user in the UK.

[base] name=Fedora Core $releasever - $basearch -
	  Base
	  baseurl=http://zeniiia.linux.org.uk/pub/distributions/fedora/linux/core/updates/$releasever/i386 
	  http://www.mirror.ac.uk/sites/download.fedora.redhat.com/pub/fedora/linux/core/$releasever/i386/os 
	  http://mirror.linux.duke.edu/pub/fedora/linux/core/updates/$releasever/i386 
	  ftp://sunsite.informatik.rwth-aachen.de/pub/Linux/fedora-core/$releasever/i386/os 
	  http://download.fedora.redhat.com/pub/fedora/linux/core/$releasever/$basearch/os 
	  #baseurl=http://fedora.redhat.com/releases/fedora-core-$releasever

Example 1. Example [base] Section of yum.conf

The baseurl variable is set to a list of URLs for the stock distribution. For the [updates-released] section, again use your list of URLs, but this time, choose a directory that contains the RPM updates for Fedora Core. For example:

[updates-released] name=Fedora Core $releasever -
	$basearch - Released Updates
	baseurl=http://fedora.redhat.com/updates/released/fedora-core-$releasever 
	http://distro.ibiblio.org/pub/linux/distributions/fedora/linux/core/updates/1/i386/

Finally, there is another configuration file to edit: /etc/sysconfig/rhn/sources. The default values for yum are found here. Look for yum fedora-core-1 and yum updates-released. Just as with yum.conf, these two can take multiple values, one on a line. For example:

yum updates-released
	http://zeniiia.linux.org.uk/pub/distributions/fedora/linux/core/updates/$releasever/i386 
	http://download.fedora.redhat.com/pub/fedora/linux/core/updates/1/i386
	http://mirrors.kernel.org/fedora/core/updates/1/i386 #Original line #yum
	updates-released
	http://download.fedora.redhat.com/pub/fedora/linux/core/updates/1/$ARCH/

The first line has been split for readability; there should be no split in the line in your configuration file. Leave the original line present, but commented out, in case you need to revert to it for some reason.

To recap:

  • Find some local (relative to you) servers from the Fedora Project site

  • Explore each one to find the right directory for the [base] and [updates-released] sections

  • Make a note of the URL for each one

  • Add them to the [base] and [updates-released] sections of yum.conf

  • Modify /etc/sysconfig/rhn/sources to include the alternative updates locations