Configuring yum


Configuring yum

As mentioned earlier, yum is primarily controlled by the contents of the yum.conf file and the /etc/yum.repos.d directory. Let's take a closer look at the contents of both of these so you can get a better understanding of how best to configure yum.

When you initially install Fedora, there is a default yum.conf file that provides several switches for the yum command. It basically saves you from having to type in a number of switches and keeps yum simple. By default, yum is configured to do the following:

  • Keep a cache of headers in /var/cache/yum

  • Give minimal onscreen information during processing

  • Keep a log-file in /var/log/yum.log

  • Download only the most up-to-date packages

  • Be tolerant of errors in the process

  • Match packages to your processor architecture

  • Have a maximum retry limit of 20 times

  • Check for obsolete packages

  • Use GPG keys to ensure the identities of packages

All these options are contained within the yum.conf file, letting you easily modify or even remove certain lines. For instance, you might need yum to try only a maximum of five times, or you might need yum to give you more visual information.

You can add repository information into the yum.conf file, but as of Fedora Core 3, there has been a change in the way yum handles repositories. New to Fedora 3 was the yum.repos.d folder that allows you to create individual configuration files for each repository. By default, Fedora comes with repositories for their base packages, updated packages, updated packages that are in testing, and the more unstable development packages. Only the base and updated packages are enabled by default.

Caution

Unless you really know what you are doing, you should avoid the more unstable repositories of fedora-updates-testing and fedora-development. These repositories contain bleeding-edge packages that can break your system. You have been warned!


Opening a repository file shows you some details about the repository itself, including the path to it (either via HTTP, FTP, or local access), any lists of mirrors for that repository, whether that repository is enabled, and whether GPG checking is enabled.

If you want to add a new repository, you need to find out a few things before you can successfully add it to either its own repository file under /etc/yum.repos.d or in the yum.conf file.

You can also configure yum to ignore or exclude updates to certain packages. So, for instance, if you have a graphics driver that works only with a specific kernel version and you do not want to have to fix it every time a new kernel is released, you can elect for yum to exclude any kernel updates. Within the yum.conf file you need to add a line within the top section similar to this:

exclude=kernel


This tells yum to ignore any packages that start with kernel, and will hopefully limit the amount of repair work you have to do when a new kernel version is installed.



Red Hat Fedora 5 Unleashed
Red Hat Fedora 5 Unleashed
ISBN: 067232847X
EAN: 2147483647
Year: 2004
Pages: 362

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net