Download rpm using yum without installing
Sometimes you may have the need to download a rpm, but not actually install it. You can use yum to do this very easily. First, install the yum-downloadonly package:
yum install yum-downloadonly
Then, issue the install command with the –downloadonly flag at the end:
yum install
For example, to download the rpm for apache:
yum install httpd --downloadonly
If you already have the package installed, but just want the rpm, you may need to use reinstall instead of install. Once the command is complete, the rpm(s) will be place in /var/cache/yum/rhel
/var/cache/yum/rhel-
For example, for 64-bit Redhat 5, they will be placed here:
/var/cache/yum/rhel-x86_64-server-5/packages


