Effective January of 2019, Oracle changed the way in which it distributes the configuration information for yum repositories provided by the Oracle Linux yum server.
In previous years, Oracle provided a single repository configuration file that was shipped by default on the installation media of each Oracle Linux release. This file could also be downloaded directly from the Oracle Linux yum server over an HTTP connection by using a utility like wget or curl.
As different software projects and packages were added to the Oracle Linux yum server, new repository configurations were added to the yum repository configuration file. Further changes to repository naming and organization resulted in additional changes to the file, requiring users to maintain updates manually and to reconcile the repositories that were enabled and those that were disabled.
Due to the monolithic nature of the file and shortcomings in the
mechanism that is used to deliver updates to repository
configuration, the repository configuration has been modularized
in favor of smaller repository files that are more targeted in
scope. These configuration files are packaged as RPM files that
will be shipped on subsequent installation media and which are
made available within the _latest
repositories
on the Oracle Linux yum server.
The original repository configuration files located at https://yum.oracle.com/public-yum-ol7.repo and at https://yum.oracle.com/public-yum-ol6.repo remain available but are deprecated in favor of the new modularized approach. While it is still possible to download and use these files, the files may not be updated for future changes to the Oracle Linux yum server repositories. You should update your systems to use the modular yum configuration as soon as possible.
Documentation for Oracle Linux is updated to reflect these changes. Note that any remaining instructions for downloading the old monolithic configuration file are deprecated. The instructions provided in this document should be used instead.
Action Items
If your system is already configured to use the modular release RPM-based yum configuration system, no additional action is required; you can install additional yum repository configuration files, as needed, by following the instructions in Installing Additional Repository Configurations.
Checking a System for Modular Yum
To check that your system is using the new modular yum configuration, perform the following actions:
-
Check that you have the appropriate base
oraclelinux-release-rel
package installed for your Oracle Linux release. For example, on Oracle Linux 7, do:rpm -q oraclelinux-release-el7
oraclelinux-release-el7-1-1.el7.noarch
-
Check that you do not have an old monolithic
public-yum-rel.repo
yum repository configuration file enabled. For example, on Oracle Linux 7, do:ls /etc/yum.repos.d/public-yum-ol7.repo
ls: cannot access /etc/yum.repos.d/public-yum-ol7.repo: No such file or directory
If this file exists and you have the base
oraclelinux-release-rel
package installed, you may still need to run the /usr/bin/ol_yum_configure.sh script. See Updating to Modular Yum.
If your system is already configured to use the modular yum configuration system, no additional action is required and you can install additional yum repository configuration files, as needed, by following the instructions in Installing Additional Repository Configurations.
Updating to Modular Yum
If you are using the old monolithic
public-yum-rel.repo
yum repository configuration file, you must first install the
appropriate base
oraclelinux-release-rel
package for your Oracle Linux release. For example, on Oracle Linux 7, do:
sudo yum install oraclelinux-release-el7
Note that if you have the _latest
repository
enabled for your Oracle Linux release, the package is also automatically
installed when you run the yum update
command.
After this package is installed, several small repository
configuration files are created in
/etc/yum.repos.d
. By default, if a monolithic
public-yum-rel.repo
yum repository configuration file already exists, the new
modular yum repository configuration files are disabled.
To complete the update, and to migrate the settings contained in
an existing
public-yum-rel.repo
yum repository configuration file, you must run the
/usr/bin/ol_yum_configure.sh script that is
included in the latest
oraclelinux-release-rel
package.
The /usr/bin/ol_yum_configure.sh script
installs any additional release RPM files that are required to
match the repositories you have enabled in the existing
public-yum-rel.repo
yum repository configuration file. The script also updates any
of the smaller, modular repository configuration files to enable
or disable repositories to match your original configuration.
Finally, the script disables the monolithic repository file by
renaming it to
public-yum-rel.repo.rpmnew-disabled
.
The new modular repository configuration files are enabled.
Your system is now current and all updates to yum configuration are handled automatically when you run the yum update command. You can install additional yum repository configuration files, as needed, by following the instructions in Installing Additional Repository Configurations.
Installing Additional Repository Configurations
After you have updated to use the modular yum configuration, all of the yum repositories that you previously enabled are also enabled. However, previously, to enable another yum repository you could download the latest version of the monolithic yum configuration file and edit that. Now, you need to install the appropriate package to obtain the yum repository configuration file where this information is installed.
At the time of this change, the packages listed in the following table are available for this purpose.
RPM Package Names | Description of Contents |
---|---|
|
Oracle Linux, UEK & Virtualization tools |
|
Oracle Linux patch repositories (for Oracle Cloud Infrastructure customers only) |
|
Software Collection Library for Oracle Linux |
|
Oracle OpenStack for Oracle Linux |
|
Spacewalk Server |
|
Spacewalk Client |
|
Gluster Storage |
|
Ceph Storage |
|
Oracle Instant Client |
|
EPEL for Oracle Linux |
|
Packages for Developers and Oracle Cloud Infrastructure |
|
MySQL Community releases |
|
Stable releases of the Go programming language |
|
Stable PHP releases |
|
Stable Node.js releases |
Note:
Additional repositories are available for Oracle Cloud Infrastructure customers to facilitate the use of some supported tools within this environment.
To obtain a current listing of all of the release packages that
are available for your Oracle Linux release, use the
yum command to list packages with the
release-el
name scheme. For example, you
would search for all of the release packages that are available
for Oracle Linux 7 as follows:
yum list *release-el7*
To install any of these yum release packages, use the yum install command, for example:
sudo yum install oracle-softwarecollection-release-el7
After a release package is installed, some repositories within
the installed repository configuration files are enabled by
default. However, in some cases you may need to enable
additional repositories that you wish to use within a
configuration. If you have the yum-utils
package installed, you can use
yum-config-manager to enable a repository,
for example:
sudo yum-config-manager --enable ol7_addons
If you need to disable a repository, you can also use yum-config-manager to achieve this. For example:
sudo yum-config-manager --disable ol7_spacewalk27_client
Use yum repolist to see which repositories are enabled or disabled on your system:
yum repolist enabled yum repolist disabled
Maintaining Yum Repository Configuration
Yum repository configuration is automatically synchronized with updates at Oracle by using the yum command. To keep your yum repository configurations current, perform a regular system update. When you perform system updates by using the yum update command, any installed yum release packages are updated and the repository configuration files are updated at the same time.
Recovering Modular Yum Configuration
If, for some reason, you remove all configuration to access the
Oracle Linux yum server repositories, 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:
sudo yum reinstall oraclelinux-release-el7 rm /etc/yum.repos.d/ol7-temp.repo
For more information about manually setting up Oracle Linux yum server repository configuration files, see https://yum.oracle.com/getting-started.html.
Oracle Linux Yum Modularization Update Notice
F14052-07
October 2022
Copyright © 2022, Oracle and/or its affiliates.