Use the RHSM download cacher to download and cache x86, x86_64, S390x, ppc64le, ppc64 Red
Hat patches in air-gapped environments.
The RHSM download cacher supports the following Red Hat versions:
- RHEL 6 x32
- RHEL 6 x64
- RHEL 7 x32
- RHEL 7 x64
- RHEL 6 s390x
- RHEL 7 s390x
- RHEL 7 PPC64LE
- RHEL 7 PPC64BE
- RHEL 8 x64
- RHEL 8 s390x
- RHEL 8 PPC64LE
- RHEL 9 x64
You can run the RHSM download cacher on a Windows system or a Linux system. For information about
requirements, see BigFix - System Requirements.
The RHSM download cacher is available from the BigFix Support site.
Note: The RHSM download cacher will need to access cdn.redhat.com at port 443 and access
sync.bigfix.com at port 80.
Note: For illustration purposes, this section indicates the steps to run the RHSM download cacher in
Windows. However, the parameters and subcommands to run the RHSM download cacher are the same for
both Windows and Linux systems.
You can run the tool
RHSMDownloadCacher.exe
to perform additional operations. To
run this tool from the command prompt, use the following
command:
RHSMDownloadCacher.exe [-h] --rootCertDir <rootcertdir>
[parameters...] {subcommand} [-h] [subparameters...]
where:
-h
-
Specifies the help message of a command instead of running the command.
--rootCertDir
-
Specifies the root directory where the entitlement certificates and system identity certificates
are located. Each set of entitlement certificates and system identity certificates must be placed in
their own folder. You can configure the rootCertDir in the plugin.ini file.
- check-baserepos
- Checks if the entitlement certificates under the certs folder can access the base Red Hat
repositories that BigFix supports. The results are displayed in the console and printed in the
RHSMDownloadCacher.log.
- check-allrepos
- Checks if the entitlement certificates under the certs folder can access the Red Hat base
repositories and its sub-repositories that BigFix supports. The results are displayed in the console
and printed in the RHSMDownloadCacher.log.
- parameters
- Specifies the optional parameters to be used to configure the download cacher.
-
- --proxyServer
- Specifies the URL of the proxy server to use. It must be a well-formed URL that contains a
protocol and a host name. The URL is usually the IP address or DNS name of your proxy server and its
port, which is separated by a colon. For example: http://192.168.100.10:8080.
- --proxyUser
- Specifies the proxy user name if your proxy server requires authentication. It is usually in the
form of domain\username.
- --proxyPass
- Specifies the proxy password if your proxy server requires authentication.
- --download_dir
- Specifies the directory where the repository metadata and the packages are cached. This
directory must be transferred to the BES Server. The localCache of the RHSM plug-in's plugin.ini
must be updated to reference this directory.
- If this parameter is not defined, the files are downloaded to the directory that is relative to
the download cacher executable directory.
If this parameter is not defined, a default download_dir
folder is used.
- --sha1_download_dir
-
With effect from version 1.0.1.0, specifies the directory where the sha1 packages are cached. The
repository metadata is still cached in the --download_dir. The sha1_download_dir option stores the
sha1 packages in a flat directory structure which can result to significant space saved when caching
multiple repositories from the same Red Hat versions. Space-saving benchmarks are established with
the use of the --sha1_download_dir through the
check-storagereq subcommand.
To learn about the storage space benchmark, see Using
–sha1_download_dir with air-gapped and internet-enabled BES Server.
- --redownload
- Specifies the flag to re-download and overwrite existing RPM files that are in the download
directory.
- If this parameter is not defined, RPM files are not re-downloaded. However, metadata are, by
default, downloaded and overwritten.
- --verifyExistingPkgChecksum
- Specifies the flag to enforce a checksum check for existing RPM files when trying to download
packages using the "buildRepo", "downloadPkg", or "downloadbypatchid" subcommands.
Note: The
checksum is set to 'off' by default.
- --loglevel
- Specifies the log level. You can choose among DEBUG', 'INFO', 'WARNING', or 'ERROR'. By default,
the value is set to 'INFO'.
- INFO
- Contains general information outlining the progress and successful downloads, with minimal
tracing information.
- WARNING
- Contains information about failed downloads, and reasons for failure.
- ERROR
- Contains errors related to the execution of the download plug-in, which might indicate an
impending fatal error.
- DEBUG
- Contains fine-grained information used for troubleshooting issues. This is the most verbose
level available.
- --help
-
Specifies the full description and help of a command instead of running the command.
- subcommand
subparameter
- Specifies the subcommand and subparameters to be used to run the download cacher.
Note: The
subcommand and subparameter names are case-sensitive.
- The subparameter varies for each subcommand as follows:
- showKeys
- Outputs the list of OS keys for the supported repositories in the <cacher
directory>\logs\RHSMDownloadCacher.log file. An OS key indicates the Red Hat
operating system version, architecture, and service pack of a single Red Hat repository.
- The syntax to run this subcommand
is:For
example,
RHSMDownloadCacher.exe --rootCertDir certs --download_dir C:\downloads
showKeys
- buildRepo
- Builds a local mirrored repository and downloads all the relevant files based on the specified
OS key.
- The syntax to run this subcommand
is:For
example,
RHSMDownloadCacher.exe --rootCertDir certs --download_dir C:\downloads buildRepo
--key server-7-x86_64
- where:
- --key OS_key1,OS_key2,…
- Specifies the Red Hat operating system version, architecture, and service pack. Entries must be
separated by a comma and must not include spaces. It must use the following format:
<product>-<version_number>-<architecture>-<sp_level>
For
example, --key server-7-x86_64
.
- check-storagereq
-
Checks the storage space requirement when using the builRepo command
with and without the --sha1_download_dir option. The results are
displayed in the console and in the RHSMDownloadCacher.log.
- downloadMetadataOnly
- Downloads the metadata of the specified OS keys.
- The syntax to run this subcommand is:
RHSMDownloadCacher.exe --rootCertDir --download_dir
C:\downloads downloadMetadataOnly --key
server-7-x86_64
For
example, RHSMDownloadCacher.exe --rootCertDir certs --download_dir C:\downloads
downloadMetadataOnly --key server-7-x86_64
- where:
- --key OS_key1,OS_key2,…
- Specifies the Red Hat operating system version, architecture, and service pack. Entries must be
separated by a comma and must not include spaces. It must use the following format:
<product>-<version_number>-<architecture>-<sp_level>
For
example, --key server-7-x86_64
.
- downloadPkg
- Downloads the listed RPM files for the specified OS key.
Note: If the package that you are
downloading has dependencies, it is suggested that that buildrepo be used instead to avoid
dependency issues
- The syntax to run this subcommand is:
For
example,
RHSMDownloadCacher.exe --rootCertDir certs --download_dir C:\temp --redownload
downloadPkg --key server-7-x86_64 --pkg python-qrcode-core-5.0.1-1.el7.noarch.rpm
- where:
- --key OS_key1,OS_key2,…
- Specifies the Red Hat operating system version, architecture, and service pack. Entries must be
separated by a comma and must not include spaces. It must use the following format:
<product>-<version_number>-<architecture>-<sp_level>
For
example, --key python-qrcode-core-5.0.1-1.el7.noarch.rpm
.
- --pkg pkg1,pkg2,…
- Indicates the package name.
- Each entry must be separated by a comma and must not include spaces. For example,
--pkg
liblcms1-1.17-77.12.1.x86_64.rpm,liblcms1-32bit-1.17-77.12.1.x86_64.rpm
.
- downloadByPatchId
- Downloads files based on the patch ID for one or more OS keys. The RHSM cacher replaces the
reference to the bulletins with the patch_id. The first two
digits of the patch_id typically refers to the year. For
example, the RHSA-2016-2589 bulletin is replaced with patch_id
162589, with '16' referring to the year.
Note: If the package
that you are downloading has dependencies, it is suggested
that that buildrepo be used instead to avoid dependency
issues
- The syntax to run this subcommand
is:For
example,
RHSMDownloadCacher.exe --rootCertDir certs
--download_dir C:\downloads downloadByPatchId --key
server-7-x86_64 --patch_id 162589
- where:
- --key OS_key1,OS_key2,…
- Specifies the Red Hat operating system version, architecture, and service pack. Entries must be
separated by a comma and must not include spaces. It must use the following format:
<product>-<version_number>-<architecture>-<sp_level>
For
example, --key server-7-x86_64
.
- --patch_id patch_id1,patch_id2,…
- Indicates the patch ID of a Fixlet, which is the first six digits in the Fixlet title.
- Each entry must be separated by a comma and must not include spaces. For example,
--patch_id 162589
.