Quote:
Originally Posted by nselx
Is there any other alternative to install packages with no internet access at the exam? in case of no enough space.
|
Yum/dnf will always try to refresh metadata by default and does all the dependency resolving thus installing multiple latest available packages without much effort/input on your end.
You can disable all internet based repositories and only enable your local repo with commands:
Code:
dnf config-manager --set-disabled \*
dnf config-manager --set-enabled mylocalrepo
Theoretically now when you go to install a package with dnf, providing all dependencies are also in the local cache, it will only update metadata of your local repo and install the packages.
Another thing to consider, is to
add the line below to /etc/dnf/dnf.conf to avoid updating metadata altogether:
Code:
metadata_expire=never
You can add that to /etc/yum.conf if you are using yum.
You can install local packages
using rpm commands, the typical command structure to install an .rpm packaged is:
Code:
rpm -ivh package-name.rpm
If there are unmet dependencies that need to be installed first, it will come back and tell you what else needs to be installed. You will then use the same rpm -ivh command to install those needed packages first, then when you go to install the original package you want to install, it may install without issues or come back and tell you something else needs to be installed, to which you install it and eventually all dependencies will be installed and you can then successfully install the original intended package. But keep note of the version number of the packages it tells you need be installed, it can't be a different version.