1.3.3 Downloading the Oracle Linux Yum Server Repository Files

The Oracle Linux yum server provides a direct mapping of all of the Unbreakable Linux Network (ULN) channels that are available to the public without any specific support agreement. The repository labels used for each repository on the Oracle Linux yum server map directly onto the channel names on ULN. See the Oracle Linux Unbreakable Linux Network User's Guide for more information about the channel names and common suffixescode used for channels and repositories.

Prior to January 2019, Oracle shipped a single yum repository configuration file for each Oracle Linux release. This configuration file is copied into /etc/yum.repos.d/public-yum-ol7.repo at installation, but can also be downloaded from the Oracle Linux yum server directly to obtain updates.

The original configuration file is deprecated in favor of modular repository files that are managed and updated automatically via yum in the form of RPM packages that are more targeted in scope. For example, core repository configuration files required for Oracle Linux 7 are available in the oraclelinux-release-el7 package. This package includes all of the repository configuration required to install base packages for the release, including packages from the ol7_latest, ol7_addons repositories and all of the supported repositories for UEK.

The modular yum repository configuration files released as packages that can be maintained via yum can help to simplify repository management and also ensure that your yum repository definitions are kept up to date automatically, whenever you update your system.

A list of all available RPM files to manage all of the possible yum repository configurations for your release can be obtained by running:

# yum list *release-el7*

To install the yum repository configuration for a particular set of software that you wish to use, use yum to install the corresponding package. For example, to install the yum repository configuration for the Oracle Linux Software Collection Library, run:

# yum install oracle-softwarecollection-release-el7

If your system is still configured to use the original single yum repository configuration file at /etc/yum.repos.d/public-yum-ol7.repo, you should update your system to transition to the current approach to handling yum repository configuration. To do this, ensure that your system is up to date and then run the /usr/bin/ol_yum_configure.sh script:

# yum update
# /usr/bin/ol_yum_configure.sh

The /usr/bin/ol_yum_configure.sh script checks the /etc/yum.repos.d/public-yum-ol7.repo file to determine which repositories are already enabled and installs the appropriate corresponding packages before renaming the original configuration file to /etc/yum.repos.d/public-yum-ol7.repo.sav to disable it in favor of the more recent modular repository configuration files.

If, for some reason, you manage to remove all configuration to access the Oracle Linux yum server repositories, you should create a temporary yum repository configuration file at /etc/yum.repos.d/ol7-temp.repo with the following as the minimum required content:

[ol7_latest]
name=Oracle Linux $releasever Latest ($basearch)
baseurl=https://yum.oracle.com/repo/OracleLinux/OL7/latest/$basearch/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
gpgcheck=1
enabled=1

Then reinstall the oraclelinux-release-el7 package to restore the default yum configuration:

# yum reinstall oraclelinux-release-el7
# rm /etc/yum.repos.d/ol7-temp.repo

For more information on manually setting up Oracle Linux yum server repository configuration files, see https://yum.oracle.com/getting-started.html.

You can enable or disable repositories in each repository configuration file by setting the value of the enabled directive to 1 or 0 for each repository listed in the file, as required. The preferred method of enabling or disabling repositories under Oracle Linux 7 is to use the yum-config-manager command as described in Section 1.3.4, “Using Yum Utilities to Manage Configuration”.