Use the CentOS Download Cacher R2 to download and cache CentOS patches in air-gapped
environments. This tool supports the Patches for CentOS6 Plugin R2 and
Patches for CentOS7 Plugin R2 sites.
The CentOS Download Cacher R2 accesses the http://mirror.centos.org
and
http://vault.centos.org
to download the packages for the updates. To avoid download
errors, ensure to configure your whitelist, firewall, or proxy to allow traffic through the listed
hosts.
You can run the CentOS Download Cacher R2 on a Windows system or a Linux system. For information
about requirements, see BigFix 10.0 - System Requirements.
The latest CentOS Download Cacher R2 is available from the BigFix Support site:
For illustration purposes, this section indicates the steps to run the CentOS Download Cacher R2
in Windows. However, the parameters and subcommands to run the CentOS Download Cacher R2 are the
same for both Windows and Linux systems.
You can run the tool
CentOSR2DownloadCacher.exe
to perform additional
operations. To run this tool from the command prompt, use the following
command:
CentOSR2DownloadCacher.exe [-h] [parameters...] {subcommand} [subparameters...]
where:
-h
-
Specifies the help message of a command instead of running the command.
- 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.
- --proxyPass
- Specifies the proxy password if your proxy server requires authentication.
- Only basic authentication is supported.
- --download_dir
- Specifies the directory where the repository metadata files are cached.
- If this parameter is not defined, the files are downloaded to the directory that is relative to
the download cacher executable directory.
- You can configure the CentOS Download Plug-in R2 to use the cached files by setting
localCache
in the plugin.ini
file.
- --sha1_download_dir
- Specifies the directory where the packages are cached with a sha1 filename into a single flat
directory. The cacher downloads all packages from all repositories (keys) as files in the specified
directory.
- Only the packages are stored in the
sha1_download_dir
. Each repository metadata
is stored in the download_dir
, and the CentOS Repository directory structure is
maintained.
- Space-saving benchmarks are established with the use of the
--sha1_download_dir
through the check-storagereq
subcommand. Using --sha1_download_dir
have shown significant decrease in storage size, download size, and time when caching multiple
repositories of the same CentOS version. This is because many packages are duplicated among
repositories with the same CentOS version (for example, centos-6.8-x64, centos-6.7-x64,
centos-6.6-x64). Space is not saved if you only cache a single repository for each CentOS version
(for example, centos-6.8-x64, centos-7.1-x64).
-
Note: When using this parameter, consider the cache limit of the BigFix server's sha1 file
folder.
- --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:
-
- check-baserepos
- Checks if the BigFix supported CentOS base repositories can be accessed. The results are
displayed in the command prompt and in the <cacher
directory>\logs\CentOSR2DownloadCacher.log file.
- check-allrepos
- Checks if the BigFix supported CentOS base repositories and sub-repositories can be accessed.
The results are displayed in the command prompt and in the <cacher
directory>\logs\CentOSR2DownloadCacher.log file.
- 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 command
prompt and in the <cacher
directory>\logs\CentOSR2DownloadCacher.log file.
- showKeys
- Outputs the list of OS keys for the supported repositories in the <cacher
directory>\logs\CentOSR2DownloadCacher.log file. An OS key indicates the CentOS
operating system version and architecture of a single CentOS repository.
- The syntax to run this subcommand
is:
CentOSR2DownloadCacher.exe --download_dir <download_dir>
[parameters] showsKeys
For
example, CentOSR2DownloadCacher.exe --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:
CentOSR2DownloadCacher.exe --download_dir <download_dir>
--sha1_download_dir <sha1_download_dir> [parameters]
buildRepo --key <OS_key1,OS_key2,…>
For
example, CentOSR2DownloadCacher.exe --download_dir C:\downloads --sha1_download_dir
C:\sha1_downloads buildRepo --key centos-7-x64, centos-6-x32, centos-6.8-x32
- where:
- --key OS_key1,OS_key2,…
- Specifies the CentOS operating system version and architecture. Entries must be separated by a
comma and must not include spaces. It must use the following format:
<product>-<version_number>-<architecture>
For
example, --key centos-7-x64
.
- downloadMetadataOnly
- Downloads the metadata of the specified OS keys.
- The syntax to run this subcommand is:
CentOSR2DownloadCacher.exe --download_dir <download_dir>
[parameters] downloadMetadataOnly --key <OS_key1,OS_key2,…>
For
example:CentOSR2DownloadCacher.exe --download_dir C:\downloads downloadMetadataOnly
--key centos-7-x64
- where:
- --key OS_key1,OS_key2,…
- Specifies the CentOS operating system version and architecture. Entries must be separated by a
comma and must not include spaces. It must use the following format:
<product>-<version_number>-<architecture>
For
example, --key centos-7-x64
.
- 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:
CentOSR2DownloadCacher.exe --download_dir <download_dir>
[parameters] downloadPkg --key <OS_key1,OS_key2…>
--pkg <pkg1,pkg2,…>
For
example:CentOSR2DownloadCacher.exe --download_dir C:\temp --redownload downloadPkg
--key centos-7-x64 --pkg python-qrcode-core-5.0.1-1.el7.noarch.rpm
- where:
- --key OS_key1,OS_key2,…
- Specifies the CentOS operating system version and architecture. Entries must be separated by a
comma and must not include spaces. It must use the following format:
<product>-<version_number>-<architecture>
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
.