yum只下载不安装:yumdownloader

如果只想通过yum下载软件的安装包,但是不需要进行安装的话,可以使用 yumdownloader 命令。

yumdownloader 命令在软件包 yum-utils 里面。

先安装 yum-utils :

yum install yum-utils -y

查看 yum-utils 软件包里面都有哪些命令:

# rpm -ql yum-utils
/etc/bash_completion.d
/etc/bash_completion.d/yum-utils.bash
/usr/bin/debuginfo-install
/usr/bin/find-repos-of-install
/usr/bin/needs-restarting
/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/show-changed-rco
/usr/bin/show-installed
/usr/bin/verifytree
/usr/bin/yum-builddep
/usr/bin/yum-config-manager
/usr/bin/yum-debug-dump
/usr/bin/yum-debug-restore
/usr/bin/yum-groups-manager
/usr/bin/yumdownloader
/usr/lib/python2./site-packages/yumutils
/usr/lib/python2./site-packages/yumutils/__init__.py
/usr/lib/python2./site-packages/yumutils/__init__.pyc
/usr/lib/python2./site-packages/yumutils/__init__.pyo
/usr/lib/python2./site-packages/yumutils/i18n.py
/usr/lib/python2./site-packages/yumutils/i18n.pyc
/usr/lib/python2./site-packages/yumutils/i18n.pyo
/usr/sbin/yum-complete-transaction
/usr/sbin/yumdb
/usr/share/doc/yum-utils-1.1.
/usr/share/doc/yum-utils-1.1./COPYING
/usr/share/doc/yum-utils-1.1./README
/usr/share/doc/yum-utils-1.1./yum-util-cli-template
/usr/share/locale/da/LC_MESSAGES/yum-utils.mo
/usr/share/man/man1/debuginfo-install..gz
/usr/share/man/man1/find-repos-of-install..gz
/usr/share/man/man1/needs-restarting..gz
/usr/share/man/man1/package-cleanup..gz
/usr/share/man/man1/repo-graph..gz
/usr/share/man/man1/repo-rss..gz
/usr/share/man/man1/repoclosure..gz
/usr/share/man/man1/repodiff..gz
/usr/share/man/man1/repomanage..gz
/usr/share/man/man1/repoquery..gz
/usr/share/man/man1/reposync..gz
/usr/share/man/man1/repotrack..gz
/usr/share/man/man1/show-changed-rco..gz
/usr/share/man/man1/show-installed..gz
/usr/share/man/man1/verifytree..gz
/usr/share/man/man1/yum-builddep..gz
/usr/share/man/man1/yum-config-manager..gz
/usr/share/man/man1/yum-debug-dump..gz
/usr/share/man/man1/yum-debug-restore..gz
/usr/share/man/man1/yum-groups-manager..gz
/usr/share/man/man1/yum-utils..gz
/usr/share/man/man1/yumdownloader..gz
/usr/share/man/man8/yum-complete-transaction..gz
/usr/share/man/man8/yumdb..gz

可以看到 yumdownloader 命令也在其中(上面红色背景的那一行)。

测试:

比如只想下载 busybox 但是不安装,可以执行如下指令:

# yumdownloader busybox
Loaded plugins: fastestmirror, refresh-packagekit
Loading mirror speeds from cached hostfile
* base: mirrors.yun-idc.com
* extras: mirrors.yun-idc.com
* updates: mirrors.yun-idc.com
busybox-1.15.-.el6_6.x86_64.rpm | kB :
# ls
busybox-1.15.1-21.el6_6.x86_64.rpm
上一篇:yum只下载不安装软件包


下一篇:(转)yum只下载不安装软件包