Sometimes we need to download a package but not install it, just to make it easy to copy the package to other machines that cannot access the Internet. Below we make only download not install.
1. Install the Yum-plugin-downloadonly plugin (if it is a CentOS 5.x version, install yum-downloadonly.noarch)
Yum Install-y Yum-plugin-downloadonly.noarch
2. Download a RPM package without installing it (the package is not installed)
Yum Install vte-y--downloadonly//vte for a RPM package that has not been installed
If the installed package, we will download the prompt is already installed, cannot download; we know Yum has a re-install command, yum reinstall. At this point we do the following
Yum Reinstall Vim-y--downloadonly//vim package is already installed, download vim pack only
3, we can also download to the specified directory
Yum Install vte-y--downloadonly--downloaddir=/usr/local/src
The VTE package (vte-0.25.1-9.el6.i686.rpm) can be found in the/USR/LOCAL/SRC directory
Ls/usr/local/src
This article is from the "M April Days" blog, please be sure to keep this source http://1015489314.blog.51cto.com/8637744/1682967
Download a RPM package with the Yum tool