1.2.2 Yum Repository Configuration

Yum repository configuration files are used by DNF to determine where different packages and their dependencies can be installed from.

The yum configuration file or yum repository configuration files can contain one or more sections that define repositories.

The following table describes the basic directives for a repository.




Location of the repository channel (expressed as a file://, ftp://, http://, or https:// address). This directive must be specified.


If set to 1, permit yum to use the channel.


Descriptive name for the repository channel. This directive must be specified.

Any other directive that appears in this section overrides the corresponding global definition in the [main] section of the DNF configuration file. See the dnf.conf(5) manual page for more information.

The following listing shows an example repository section from a configuration file.

name=Oracle Linux $releasever Application Stream ($basearch)

In this example, the values of gpgkey and gpgcheck override any global setting. dnf substitutes the name of the current system's architecture for the variable $basearch.

The dnf command automatically searches the /etc/yum.repos.d directory for files with the suffix .repo and appends these to the configuration when it is processing. Use this directory to define repository files for repositories that you want to make available.