How to Download RPMs Locally from Oracle Linux Repositories
Applies to:
Oracle Cloud Infrastructure - Version N/A and later
Linux x86-64
Goal
There is a need to download RPMs from Oracle Linux repositories to then be applied to other instances using internal processes.
Solution
1) If the package is not already installed in the system, use:
$ sudo yum install --downloadonly --downloaddir=. package-name
This will download the RPM and any needed dependencies to the local directory.
Notice that the dependencies that are downloaded are relative to the system where the download is being executed. Destination systems where the rpms are going to be installed may need additional dependencies or already have some of them installed.