More Options - yum download a package without installing

Yum More Options - yum download a package without installing

For this activity we need a yum-downloadonly package .So check and
confirm the availability .

#yum install yum-downloadonly

Actually yum-downloadonly is a plugin which can be used to download
packages from yum repository without installing the package.

Before that Check contents of file /etc/yum/pluginconf.d/
downloadonly.conf and make sure this plugin is enabled:

[main]
enabled=1

Example, run the below command to download the newest version of
vsftpd, if it is available, without installing it:

# yum install --downloadonly vsftpd

The package, by default, is saved in directory /var/cache/yum/ .

Pass the option --downloaddir with --downloadonly to yum, to specify
an alternate directory to store packages

#yum install --downloadonly --downloaddir=/tmp vsftpd

The newest version of vsftpd, if it exists, is downloaded.

To download a package that is currently installed, please use
yumdownloader instead. For example, httpd-2.2.3-22.el5 is installed in
system:

# rpm -q httpd
httpd-2.2.3-22.el5

Download that package with yumdownloader:

# yumdownloader httpd-2.2.3-22.el5
Loaded plugins: fastestmirror, kmod, protectbase, rhnplugin,
versionlock
Loading mirror speeds from cached hostfile
Reading version lock configuration
0 packages excluded due to repository protections
httpd-2.2.3-22.el5.i386.rpm

That downloaded package is saved in the current directory.

Option --destdir can be used to specify a specific destination
directory for the download

No comments:

Post a Comment

Thank You for your Comments, We will read and response you soon...