Populate the Package Repositories

During the local mirror setup, a directory structure is created where downloaded packages will be stored. You must create soft links to these subdirectories to allow the system to locate the packages. Then you perform a repository update to download the packages to the respective local repositories. The directory structure, soft links, and repository update commands are different for Oracle Linux 7 and Oracle Linux 8, so be sure to follow the instructions for the operating system version of your local ULN mirror.

Note:

As long as a channel contains no package updates, you cannot subscribe to it yet, which implies that its local mirror directory does not exist and no soft link can be created. Check your ULN registration regularly for new "PCA" channels. If new channels are found, repeat the procedure: subscribe to them, create the soft links, and perform a repository update.

Caution:

When you perform a repository update, understand that all mirrored channels are populated with the latest packages from the Oracle ULN servers, and older package versions will no longer be present. You must keep the mirror repositories at a given version until all appliance components have been patched. Ensure that automatic synchronization is disabled. If the mirror is synchronized between patch operations, components will be patched to different software levels. This leads to unreliable appliance operation and potential service disruption.

  1. Create soft links for your local mirror directories.

    The default location of the EngineeredSystems directory is /var/www/html/yum/EngineeredSystems. To ensure that the system can locate the packages in the subdirectories, create soft links in the parent directory /var/www/html/yum that point to the mirror subdirectories.

    • Soft links on an Oracle Linux 8 mirror:

      The default package location is /var/www/html/yum. The system can locate the packages automatically in all its subdirectories, except the container images directory. Create this soft link:

      ln -s pca302_x86_64_containers pca302_x86_64_container_images
    • Soft links on an Oracle Linux 7 mirror:

      The default package location is /var/www/html/yum/EngineeredSystems. To ensure that the system can locate the packages in the subdirectories, create soft links in the parent directory /var/www/html/yum that point to the mirror subdirectories.

      ln -s EngineeredSystems/pca302/hypervisor/x86_64 pca302_x86_64_hypervisor
      ln -s EngineeredSystems/pca302/containers/x86_64 pca302_x86_64_container_images
      ln -s EngineeredSystems/pca302/fw/x86_64 pca302_x86_64_fw
      ln -s EngineeredSystems/pca302/mn/x86_64 pca302_x86_64_mn
      ln -s EngineeredSystems/pca302/oci/x86_64 pca302_x86_64_oci
      ln -s EngineeredSystems/pca302/regionregistry/x86_64 pca302_x86_64_regionregistry

    Note:

    This example assumes that all "PCA" channels contain updates. If a channel has no updates, you cannot subscribe to it, meaning the mirror directory and soft link cannot be created. Check your ULN registration whenever a new appliance software build is released, and repeat this procedure if new "PCA" channels are available.

  2. Populate or update the repositories. The following commands download all new packages to the local mirror file system. The initial download could take an hour or longer.

    • Oracle Linux 8 repository update command:

      # dnf reposync --delete --download-metadata -p /var/www/html/yum
    • Oracle Linux 7 repository update command:

      # /usr/bin/uln-yum-mirror

    Caution:

    Keep the mirror repositories at a given version until all appliance components have been patched. Ensure that automatic synchronization is disabled. If the mirror is synchronized between patch operations, components will be patched to different software levels. This leads to unreliable appliance operation and potential service disruption.

  3. Verify that a repodata subdirectory was created inside the package directories. This confirms that the repository was populated successfully.

    Perform this check for each new ULN channel you set up on the mirror. There is no need to repeat these checks when an existing local repository is updated.

    • Oracle Linux 8:

      Verify that a repodata subdirectory was created inside a package directory. For example:

      # ls -l /var/www/html/yum/pca302_x86_64_hypervisor/
      drwxr-xr-x. 2 root root 12288 May 16 22:10 getPackage
      drwxr-xr-x. 2 root root  4096 May 16 22:10 getPackageSource
      drwxr-xr-x. 2 root root  4096 May 16 22:10 repodata
    • Oracle Linux 7:

      Verify that a repodata subdirectory was created at the location of a soft link. For example:

      # ls -l /var/www/html/yum/pca302_x86_64_hypervisor/
      drwxr-xr-x. 2 root root 12288 Mar 29 03:13 getPackage
      drwxr-xr-x. 2 root root 12288 Jun  5 03:18 headers
      drwxr-xr-x. 2 root root  4096 Jun  5 03:18 repodata