2.5 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:

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