NAME
yum.conf - Configuration file for yum(8).
DESCRIPTION
Yum uses uses a configuration file called
yum.conf. This configuration file is searched for
in the following places:
/etc/yum.conf
PARAMETERS
There are two types of sections in the yum.conf file: main and server. Main defines all the global configuration options. The server section(s) define the entries for each server.
[main] options
The [main] section must exist for yum to do anything. It consists of the following options:
- cachedir
-
directory where yum should store its cache and db files.
- reposdir
-
directory where yum should look for .repo files for its configuration
of repositories. Defaul is /etc/yum.repos.d
- debuglevel
-
debug level. practical range is 0-10.
default is 2.
- errorlevel
-
debug level. practical range is 0-10.
default is 2.
- logfile
-
full directory and file name for where yum should write its log file.
- assumeyes
-
1 or 0 - tells yum whether or not to prompt you for confirmation of actions.
Same as -y on the command line. Default to 0.
- exclude
-
list of packages to exclude from updates or installs. This should be a space separated list.
Filename globs *,?,., etc are allowed
- exactarch
-
1 or 0 - set to 1 to make yum update only update the architectures of
packages that you have installed. IE: with this enabled yum will not install an i686
package to update an i386 package.
- obsoletes
-
boolean - set to 1 to make yum look at obsoleting packages when processing
updates. Set to 0 to disable obsolete processing. Default 0.
- commands
-
list of functional commands to run if no functional commands are specified
on the command line. ie: commands = update foo bar baz quux
none of the short options (-y, -e, -d, etc) will be taken in the field.
- distroverpkg
-
package to use to determine the "version" of the distribution - can be any
package you have installed - defaults to redhat-release.
- diskspacecheck
-
set this to 0 to disable the checking for sufficient diskspace before the
rpm transaction is run. default is 1 (to perform the check)
- recent
-
number of days back to look for 'recent' packages added to a repository.
Used by the 'list recent' and generate-rss commands. Default is 7 days.
- retries
-
Set the number of times any attempt to retrieve a file should retry before
returning an error. Setting this to 0 makes it try forever. Default to 6.
- showdupesfromrepos
-
Boolean - set to 1 if you wish to show any duplicate packages from any
repository. Set to 0 if you want only to see the newest packages from any
repository. Default 0.
- installonlypkgs
-
list of packages that should only ever be installed, never updated - kernels
in particular fall into this category. Defaults to kernel, kernel-smp,
kernel-bigmem, kernel-enterprise, kernel-debug, kernel-unsupported.
- gpgcheck
-
either '1' or '0'. This tells yum whether or not it should perform a gpg signature check
on packages. When this is set in the [main] section it sets the default for
the repositories sections. If gpgcheck is not specified in the repositories
then whatever this is set to will be their default. Its default is 0. In
addition, this option determines whether or not an install of a package from
a local rpm file will be gpg signature checked.
[server] options
The server section(s) take the following form:
- Example:
-
[serverid]
name=Some name for this server
baseurl=url://path/to/repository/
gpgcheck=[1|0]
- serverid
-
must be a unique name for each server, one word.
- baseurl
-
must be a url to the directory where the yum repository's 'headers' directory lives.
Can be an http://, ftp:// or file:// url.
You can specify multiple urls in one baseurl statement. The best way to do
this is like this:
[serverid]
name=Some name for this server
baseurl=url://server1/path/to/repository/
url://server2/path/to/repository/
url://server3/path/to/repository/
If you list more than one baseurl= statement in a repository you will find
yum will ignore the earlier ones and probably act bizarrely. Don't do this,
you've been warned.
- name
-
a human readable string describing the repository.
- gpgcheck
-
either '1' or '0'. This tells yum whether or not it should perform a gpg signature check on the packages gotten from this server
- mirrorlist
-
specifies a url to a file containing a list of baseurls.
- failovermethod
-
can be either 'roundrobin' or 'priority'.
roundrobin randomly selects a url out of the list of urls to start with and
proceeds through each of them as it encounters a failure contacting the
host.
priority starts from the first baseurl listed and reads through them
sequentially.
failovermethod defaults to roundrobin if not specified.
- exclude
-
same as the [main] exclude but this is only for this server
variables, listed below, are honored here.
- includepkgs
-
Inverse of exclude. It is a list of the packages you want to use from a
repository. So if the field only lists one package then that is all yum will
ever see from the repository. Defaults to an empty list.
VARIABLES
There are a number of variables you can use to ease maintenance of the
configuration file. They are only useful inside the name, baseurl and
commands fields in the config file.
- $releasever
-
This will be replaced with the value of the version of the package listed
in distroverpkg. This defaults to the version of the package
redhat-release
- $arch
-
This will be replaced with your architecture as listed by os.uname()[4] in
python.
- $basearch
-
This will be replaced with your base architecture as they are listed in
archwork.py in yum. For example if your $arch is i686 your $basearch will be
i386.
- $YUM0-$YUM9
-
These will be replaced with the value of the shell environment variable of
the same name. If the shell environment variable does not exist then they
will not be replaced.
FILES
/etc/yum.conf
SEE ALSO
yum(8)
Index
- NAME
-
- DESCRIPTION
-
- PARAMETERS
-
- [main] options
-
- [server] options
-
- VARIABLES
-
- FILES
-
- SEE ALSO
-