This article is a mirror article of machine translation, please click here to jump to the original article.

View: 34134|Reply: 6

[linux] CentOS 7 offline installation of rpm packages automatically resolves dependencies

[Copy link]
Posted on 6/16/2021 2:56:10 PM | | | |
When the production environment is disconnected due to security reasons. Using yum to automatically install software and handle dependencies through local sources.
However, the most critical problem of this method is how to obtain the software and its dependencies for use by local sources?

When there are fewer dependencies to install software, it may be a solution to consider by manually finding and downloading them one by one, and when a software has hundreds of dependencies, and there are dependencies on the dependencies, then you try again?


Linux package search download address:The hyperlink login is visible.


First, install the yum-plugin-downloadonly plugin with the following command:

Download libgdiplus-devel and its dependencies

(Note:The download dependency is to detect the dependencies that are missing from the current system, so it must be the system environment of two same servers


where --downloaddir specifies the storage location of the downloaded rpm package, followed by the name of the software that needs to be installed by yum, and supports multiple parts.

After downloading the rpm package on the network machine, copy it to the server without the network and install it. The command is as follows:


Or so
(End)





Previous:The difference between Linux devel packages and non-devel packages
Next:.NET/C# to determine whether a type is nullable or not
 Landlord| Posted on 6/16/2021 3:07:39 PM |
Download via YumDownloader

If you only want to download the software installation package through yum, but you don't need to install it, you can use the yumdownloader command.

The yumdownloader command is in the package yum-utils.

Install yum-utils first:


See what commands are in the yum-utils package:

(/usr/bin/yumdownloader command included in the package)

Get the libgdiplus-devel installation package and its dependencies


Posted on 6/16/2021 11:36:39 PM |
Thanks for sharing, support!
 Landlord| Posted on 10/15/2021 3:08:00 PM |
yum install --downloadonly --downloaddir=/tmp/ [package-name]-[version]. [architecture]

# For example:

yum install --downloadonly --downloaddir=/tmp/ cri-tools-1.0.0_beta.1-0
 Landlord| Posted on 10/15/2021 3:18:42 PM |
Query the version of the package via the command line



 Landlord| Posted on 10/21/2021 9:03:28 AM |


1.--nodeps is not checking dependencies when installing, for example, you need A at this rpm, but you don't install A, so your package can't be installed, and you can install it with --nodeps.

2.--force is a forced installation, for example, if you have installed version 1 of this rpm, if you want to install version 2 of this rpm, you need to use --force to force installation.
 Landlord| Posted on 12/18/2021 11:58:29 AM |
Disclaimer:
All software, programming materials or articles published by Code Farmer Network are only for learning and research purposes; The above content shall not be used for commercial or illegal purposes, otherwise, users shall bear all consequences. The information on this site comes from the Internet, and copyright disputes have nothing to do with this site. You must completely delete the above content from your computer within 24 hours of downloading. If you like the program, please support genuine software, purchase registration, and get better genuine services. If there is any infringement, please contact us by email.

Mail To:help@itsvse.com