The software described in this documentation is either in Extended Support or Sustaining Support. See https://www.oracle.com/us/support/library/enterprise-linux-support-policies-069172.pdf for more information.
Oracle recommends that you upgrade the software described by this documentation as soon as possible.

2.3.2 Yum Repository Configuration

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

The following table lists the basic directives for a repository.

Directive

Description

baseurl

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

enabled

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

name

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 [main] section of the yum configuration file. See the yum.conf(5) manual page for more information.

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

[ol6_u2_base]
name=Oracle Linux 6 U2 - $basearch - base 
baseurl=https://yum.oracle.com/repo/OracleLinux/OL6/2/base/$basearch 
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY 
gpgcheck=1 
enabled=1

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

yum 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.