Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Install yum packages without internet connection

Tags:

yum

centos7

Is there any way to download all packages from this line, save them locally and then install them to a machine without an internet connection?

yum install -y qemu-kvm qemu-img virt-manager libvirt libvirt-python libvirt-client virt-install virt-viewer bridge-utils
like image 828
Aira Avatar asked May 29 '17 18:05

Aira


People also ask

Can you yum install without internet?

To carry out a yum command without a network connection, add the -C command-line option. With this option, yum proceeds without checking any network repositories, and uses only cached files. In this mode, yum may only install packages that have been downloaded and cached by a previous operation.

What is command to install packages using yum?

To install a particular package from a specific enabled or disabled repository, you must use --enablerepo an option in your yum command.


1 Answers

Yes, you can use the --downloadonly command.

Run yum install qemu-kvm qemu-img virt-manager libvirt libvirt-python libvirt-client virt-install virt-viewer bridge-utils --downloadonly it will prompt to install but it wont and will instead show;

yum install procmail --downloadonly
Installed size: 385 k
Is this ok [y/N]: y         
Downloading Packages:
exiting because --downloadonly specified

By default the downloaded files are in; /var/cache/yum/

There are some more details here on the RedHat page.

like image 118
user3788685 Avatar answered Oct 13 '22 19:10

user3788685