We able to download the packages by YUM command without any installing it. There are two ways,
1. downloadonly plugin
2. yumdownload utility
First, check downloadonly plugin how it's working ?
Install that packages using yum command,
RHEL6
# yum install yum-plugin-downloadonly
RHEL5
# yum install yum-downloadonly
Install the downloadonly plugin
# yum install yum-plugin-downloadonly
Dependencies Resolved
================================================================
Package Arch Version Repository Size
================================================================
Installing:
yum-plugin-downloadonly noarch 1.1.30-17.el6_5 updates 21 k
Transaction Summary
================================================================
Install 1 Package(s)
Installed:
yum-plugin-downloadonly.noarch 0:1.1.30-17.el6_5
Complete!
Dependencies Resolved
================================================================
Package Arch Version Repository Size
================================================================
Installing:
yum-plugin-downloadonly noarch 1.1.30-17.el6_5 updates 21 k
Transaction Summary
================================================================
Install 1 Package(s)
Installed:
yum-plugin-downloadonly.noarch 0:1.1.30-17.el6_5
Complete!
Note :
Possible to download multiple packages on the same command
Unfortunately the plugin doesn't support to "yum goupinstall"
Before utilizing the plugin, be assured "enabled=1" in /etc/yum/pluginconf.d/downloadonly.conf like,
#vi /etc/yum/pluginconf.d/downloadonly.conf
[main]
enabled=1
[main]
enabled=1
To determine packages within a specific group "yum groupinfo"
You can download specific packages with name and version(like, nagios-3.5.1-1.el6.i686.rpm)
If you will not use the --downloaddir option, by default files are stored in /var/cache/yum in rhel-{arch}-channel/packages
Syntax :
yum install --downloadonly --downloaddir=<directory name> <package name>
How to use it?
# yum install --downloadonly --downloaddir=/root nagios
...
...
exiting because --downloadonly specified
...
...
exiting because --downloadonly specified
Second, check Yum downloader how it's working ?
yumdownloader is used for download RPM packages from Yum repositories
Install the yum-utils package using yum command
# yum install yum-utils
=====================================================
Package Arch Version Repository Size
=====================================================
yum-utils noarch 1.1.30-17.el6_5 updates 102 k
Transaction Summary
=====================================================
Installed:
yum-utils.noarch 0:1.1.30-17.el6_5
=====================================================
Package Arch Version Repository Size
=====================================================
yum-utils noarch 1.1.30-17.el6_5 updates 102 k
Transaction Summary
=====================================================
Installed:
yum-utils.noarch 0:1.1.30-17.el6_5
Note:
By default, the packets stored in the current working directory
If you will use --destdir option used for saving the files to a specified location,
Syntax
yumdownloader <package name>
How to use it?
# yumdownloader kernel
...
kernel-2.6.32-431.17.1.el6.i686.rpm | 26 MB 00:06 | 1.2 MB 00:02
# ls
kernel-2.6.32-431.17.1.el6.i686.rpm
...
kernel-2.6.32-431.17.1.el6.i686.rpm | 26 MB 00:06 | 1.2 MB 00:02
# ls
kernel-2.6.32-431.17.1.el6.i686.rpm
Comments (0)