Search This Blog

Tuesday, July 26, 2011

How to Download RPM using yum?

For example:
Consider a scenario where you would only need to download the rpm and not necessarily install it.

You will have to install an additional rpm called yum-downloadonly
yum install yum-downloadonly

Once the above rpm is installed all you have to do is run below command.
yum install sendmail-cf-8.13.8-2.el5 -y --downloadonly --downloaddir=/tmp

(In above example sendmail-cf-8.13.8-2.el5 rpm is downloaded and stored in /tmp .in your case it could be anything.)

The above command will only download the rpm and not necessarily installed it.

Note:
(I would recommend you to run above command where rpm getting downloaded is not already installed in my case it is sendmail-cf-8.13.8-2.el5 .Otherwise you will get an error saying rpm is already installed.You may remove the rpm using rpm -e )

No comments:

Post a Comment