Download and install an RPM file on fly from ftp or http server

Posted on in Categories Linux, RedHat/Fedora Linux, Suse Linux, Sys admin, Tips last updated November 1, 2006

Many books or free Linux tech support recommends downloading an RPM file using wget and installing it using rpm command. For example to install awstats rpm:

Go to /tmp directory
$ cd /tmp
Download awstats using wget
$ wget http://easynews.dl.sourceforge.net/sourceforge/awstats/awstats-6.5-1.noarch.rpm
Now install awstats
$ sudo rpm -ivh awstats*OR# rpm -ivh awstats*

To be frank you can skip all three steps with one command:
# rpm -ivh http://easynews.dl.sourceforge.net/sourceforge/awstats/awstats-6.5-1.noarch.rpmOutput:

Retrieving http://easynews.dl.sourceforge.net/sourceforge/awstats/awstats-6.5-1.noarch.rpm
Preparing...                ########################################### [100%]
   1:awstats                ########################################### [100%]

RPM command is capable of downloading and installing an RPM file on fly. This is will save your time.

Please note that only use this method if you trust remote server/rpm file. Otherwise it will be a security nightmare for you.

Posted by: Vivek Gite

The author is the creator of nixCraft and a seasoned sysadmin, DevOps engineer, and a trainer for the Linux operating system/Unix shell scripting. Get the latest tutorials on SysAdmin, Linux/Unix and open source topics via RSS/XML feed or weekly email newsletter.

Share this on (or read 4 comments/add one below):

4 comment

  1. I tend to think they avoid “missing dependencies” failed installation and then the need to re-download the package. but the trick work as you mention.

    Have a question? Post it on our forum!