[root@localhost ~]# rpm -qa | grep yum-utils # 查看系统是否安装yum 自带工具 yumdownloader
[root@localhost ~]# yum -y install yum-utils # 安装 yum 工具。

[root@localhost ~]# rpm -qa | grep yum-utils # 查看安装工具。
yum-utils-1.1.16-21.el5.centos

[root@localhost ~]# yumdownloader httpd # 下载软件包。
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
httpd-2.2.3-92.el5.centos.x86_64.rpm | 1.3 MB 00:07

[root@localhost ~]# ls # 查看下载软件包。
httpd-2.2.3-92.el5.centos.x86_64.rpm

方法二:
[root@localhost ~]# yum -y install yum-downloadonly

[root@localhost ~]# rpm -qa | grep yum-downloadonly
yum-downloadonly-1.1.16-21.el5.centos

[root@localhost ~]# yum -y install --downloadonly --downloaddir=/tmp/ httpd

[root@localhost ~]# ls /tmp/
httpd-2.2.3-92.el5.centos.x86_64.rpm