--downloadonly : don't update, just download a rpm file
--downloaddir=/path/to/dir : specifies an alternate directory to store packages such as /tmp
- Code: Select all
yum install yum-downloadonly
- Code: Select all
yum update -y --downloadonly
Method # 2: yum-utils.noarch Package
yum-utils is a collection of utilities and examples for the yum package manager. It includes utilities by different authors that make yum easier and more powerful to use. These tools include: debuginfo-install, package-cleanup, repoclosure, repodiff, repo-graph, repomanage, repoquery, repo-rss, reposync, repotrack, verifytree, yum-builddep, yum-complete-transaction, yumdownloader, yum-debug-dump and yum-groups-manager.
- Code: Select all
yum -y install yum-utils.noarch
Now use the yumdownloader command which is a program for downloading RPMs from Yum repositories. Type the following command to download httpd rpm file:
- Code: Select all
yumdownloader httpd