Http://www.linuxidc.com/Linux/2012-06/62664.htm
Today, under the CentOS download software, do not install the method:
Method One: Bring a tool by Yum: Yumdownloader
[Root@web1 ~]# Rpm-qa |grep yum-utils
[Root@web1 ~]# yum-y Install yum-utils*
[Root@web1 ~]# rpm-ql yum-utils
/usr/bin/debuginfo-install
/usr/bin/package-cleanup
/usr/bin/repo-graph
/usr/bin/repo-rss
/usr/bin/repoclosure
/usr/bin/repodiff
/usr/bin/repomanage
/usr/bin/repoquery
/usr/bin/reposync
/usr/bin/repotrack
/usr/bin/verifytree
/usr/bin/yum-builddep
/usr/bin/yum-debug-dump
/usr/bin/yum-groups-manager
/usr/bin/yumdownloader #可以看到yumdownloade这个工具是由yum-utils This software installation generated.
Can be used directly after installation, using very simple, as follows:
[root@web1 ~]# ls
sys_init.sh
[root@web1 ~]# yumdownloader vlock
Loaded Plugins:fastestmirror
Loading Mirror speeds from cached hostfile
* addons:mirror.centos.org
* ba Se:mirrors.btte.net
* extras:mirrors.btte.net
* updates:mirrors.btte.net
vlock-1.3-23.i386.rpm | kb 00:00
[root@web1 ~]# ls
sys_init.sh vlock-1.3-23.i386.rpm
Method Two: A plugin using yum: yum-downloadonly
Install Yum-downloadonly
[Root@web1 ~]# yum-y Install yum-downloadonly
[Root@web1 ~]# rpm-q yum-downloadonly
Yum-downloadonly-1.1.16-21.el5.centos
The use method is also very simple:
[Root@web1 ~]# rpm-e Vlock
[Root@web1 ~]# yum-y Install--downloadonly--downloaddir=/tmp/vlock
[Root@web1 ~]# ll/tmp/
Total 12
-rw-r--r--1 root root 11182 Nov 2007 vlock-1.3-23.i386.rpm
--downloadonly Description Download Only
--DOWNLOADDIR specifies which directory to install to.
Later you can download the relevant software by Yum.