Download a RPM Package Using yum

Download a RPM Package Using yum

 

[root@mail ~]# yumdownloader httpd
Loaded plugins: fastestmirror, refresh-packagekit
Loading mirror speeds from cached hostfile

* base: ftp.cuhk.edu.hk
* extras: ftp.cuhk.edu.hk
* rpmforge: ftp-stud.fht-esslingen.de
* updates: ftp.cuhk.edu.hk
base                                                     | 3.7 kB     00:00
extras                                                   | 3.0 kB     00:00
rpmforge                                               | 1.1 kB     00:00
updates                                                 | 3.5 kB     00:00
httpd-2.2.15-5.el6.centos.x86_64.rpm      | 811 kB     00:35

[root@mail ~]# find . -name httpd-2.2.15-5.el6.centos.x86_64.rpm -print
./httpd-2.2.15-5.el6.centos.x86_64.rpm
[root@mail ~]# ls

yumdownloader -h

[root@mail ~]# yumdownloader -h
Loaded plugins: fastestmirror, refresh-packagekit
Usage: "yumdownloader [options] package1 [package2] [package..]

Options:
Plugin Options:

Yum Base Options:
-h, --help          show this help message and exit
-t, --tolerant      be tolerant of errors
-C, --cacheonly     run entirely from system cache, don't update cache
-c [config file], --config=[config file]
config file location
-R [minutes], --randomwait=[minutes]
maximum command wait time
-d [debug level], --debuglevel=[debug level]
debugging output level
--showduplicates    show duplicates, in repos, in list/search commands
-e [error level], --errorlevel=[error level]
error output level
--rpmverbosity=[debug level name]
debugging output level for rpm
-q, --quiet         quiet operation
-v, --verbose       verbose operation
-y, --assumeyes     answer yes for all questions
--version           show Yum version and exit
--installroot=[path]
set install root
--enablerepo=[repo]
enable one or more repositories (wildcards allowed)
--disablerepo=[repo]
disable one or more repositories (wildcards allowed)
-x [package], --exclude=[package]
exclude package(s) by name or glob
--disableexcludes=[repo]
disable exclude from main, for a repo or for
everything
--obsoletes         enable obsoletes processing during updates
--noplugins         disable Yum plugins
--nogpgcheck        disable gpg signature checking
--disableplugin=[plugin]
disable plugins by name
--enableplugin=[plugin]
enable plugins by name
--skip-broken       skip packages with depsolving problems
--color=COLOR       control whether color is used
--releasever=RELEASEVER
set value of $releasever in yum config and repo files

yumdownloader options:
--destdir=DESTDIR   destination directory (defaults to current directory)
--urls              just list the urls it would download instead of
downloading
--resolve           resolve dependencies and download required packages
--source            operate on source packages
--archlist=ARCHLIST
only download packages of certain architecture(s)