yumdownloader how to to download a RPM package without installing it

Download yumdonwloader

First of all, you have to download yumdownloader

yum -y install yum-utils

yumdownloader

usage: yumdownloader package Example, for 64-bits package:

-bash-4.2$ yumdownloader glibc-devel.x86_64 
Loading mirror speeds from cached hostfile
glibc-devel-2.17-196.el7_4.2.x86_64.rpm                    | 1.1 MB   00:00

Example, for 32-bits package:

-bash-4.2$ yumdownloader glibc-devel.i686
Modules complémentaires chargés : fastestmirror, langpacks
Loading mirror speeds from cached hostfile
glibc-devel-2.17-196.el7_4.2.i686.rpm                      | 1.1 MB   00:00 

Dependencies

To download all dependencies of a given package use resolve option:

-bash-4.2$ yumdownloader --resolve nss-pam-ldapd
Modules complémentaires chargés : fastestmirror, langpacks
Loading mirror speeds from cached hostfile
(1/3): nscd-2.17-196.el7_4.2.x86_64.rpm
(2/3): nss-pam-ldapd-0.8.13-8.el7.i686.rpm
(3/3): nss-pam-ldapd-0.8.13-8.el7.x86_64.rpm