If the command is giving blank output that means you must install the same using command below:
[root@rhel1 mann]# yum install yum-utils Loaded plugins: downloadonly, product-id, security, subscription-manager Updating certificate-based repositories. Setting up Install Process Resolving Dependencies --> Running transaction check ---> Package yum-utils.noarch 0:1.1.30-10.el6 will be installed --> Finished Dependency Resolution Dependencies Resolved ======================================================================================================================================================================== Package Arch Version Repository Size ======================================================================================================================================================================== Installing: yum-utils noarch 1.1.30-10.el6 server 94 k Transaction Summary ======================================================================================================================================================================== Install 1 Package(s) Total download size: 94 k Installed size: 286 k Is this ok [y/N]: y Downloading Packages: Running rpm_check_debug Running Transaction Test Transaction Test Succeeded Running Transaction Installing : yum-utils-1.1.30-10.el6.noarch 1/1 Installed products updated. Installed: yum-utils.noarch 0:1.1.30-10.el6 Complete! [root@rhel1]#
- Once you are done with yum-utlils give yumdownloader as below
yumdownloader <package name>
Let’s say you want to download rpm package for famous vi editor then:
[root@rhel1]# pwd /root [root@rhel1]# yumdownloader vi Loaded plugins: amazon-id, rhui-lb vim-minimal-7.4.160-1.el7_3.1.x86_64.rpm | 436 kB 00:00:00 [root@rhel1]# ll total 452 -rw-------. 1 root root 7548 Mar 1 2016 anaconda-ks.cfg -rw-r--r--. 1 root root 446692 Dec 21 04:44 vim-minimal-7.4.160-1.el7_3.1.x86_64.rpm [root@rhel1]#
The above command will download rpm package in the current directory to specify download rpm package directory you must use “–destdir” option as below:
[root@rhel1]# yumdownloader --destdir=/tmp/mann vi Loaded plugins: amazon-id, rhui-lb vim-minimal-7.4.160-1.el7_3.1.x86_64.rpm | 436 kB 00:00:00 [root@rhel1]# cd /tmp/mann/ [root@rhel1 mann]# ll total 444 -rw-r--r--. 1 root root 446692 Dec 21 04:44 vim-minimal-7.4.160-1.el7_3.1.x86_64.rpm [root@rhel1 mann]#
Pages: 1 2
Robert C Lee says
I don’t follow the step 2. I thought you would show how to download but not installed the rpms. I have an air gapped system to which I can apply this technique on a internet accessible system. Step 1 was detailed but step 2 doesn’t seem to follow from step 1.