Setting Up a Local Yum Mirror
A system that functions as a local yum repository mirrors repositories from the public Oracle Linux yum server.
When Oracle Linux is installed on this system, that system automatically contains the
repositories that are required by the system's OS. These repositories are found in the
system's /etc/yum/repos.d
directory. The repositories are defined in
different /etc/yum/repos.d/*.repo
files.
By mirroring these default repositories, the system can function as a local yum server to service clients that have the same OS and platform as the mirror.
However, you might want the local yum mirror to also service clients that use different OS releases for other platforms. In this case, you would need to define other repositories that are required by those clients.
How to Configure the Local Yum Server
Setting up a system to function as a local yum server involves mirroring required repositories from the public Oracle Linux yum server.
The yum mirror must meet the requirements described in Prerequisites for the Local Distribution Mirror. Also, you must have completed the procedure in How to Set Up a Distribution Mirror.
You can mirror any repository available on the Oracle Linux yum server, if you have the
definition for the repository configured in /etc/yum.repos.d
. Mirroring
repositories that the system already has available is uncomplicated. However, for other
repositories, you might need to be more specific about the which repositories you want to
mirror. Moreover, you might need to provide other repository configuration.
How to Use rsync to Mirror the Oracle Linux Yum Server
Oracle provides an rsync
interface to the Oracle Linux yum server
repositories at the yum-rsync.oracle.com
domain that maps directly to the
URL structure of the Oracle Linux yum server.
With the rsync
interface, you can easily mirror the Oracle Linux yum
server for broader usage without any requirement for complex system configuration. This
approach is helpful for large enterprises that want to mirror entire repository structures
for all architectures. The rsync
interface is an alternative method to
running the reposync
command to synchronize mirrored repositories.
How to Mirror Repositories From an ISO
The local yum mirror can be configured to mirror repositories from an ISO image to make them available to clients.
This task assumes that you're mirroring the repositories from an Oracle Linux 8 image. It also assumes that to provide access to the mirror, you're using a web server.