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

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:

ADVERTISEMENTS

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.

🐧 Get the latest tutorials on SysAdmin, Linux/Unix, Open Source & DevOps topics via:
CategoryList of Unix and Linux commands
File Managementcat
FirewallCentOS 8 OpenSUSE RHEL 8 Ubuntu 16.04 Ubuntu 18.04 Ubuntu 20.04
Network Utilitiesdig host ip nmap
OpenVPNCentOS 7 CentOS 8 Debian 10 Debian 8/9 Ubuntu 18.04 Ubuntu 20.04
Package Managerapk apt
Processes Managementbg chroot cron disown fg jobs killall kill pidof pstree pwdx time
Searchinggrep whereis which
User Informationgroups id lastcomm last lid/libuser-lid logname members users whoami who w
WireGuard VPNCentOS 8 Debian 10 Firewall Ubuntu 20.04

ADVERTISEMENTS
4 comments… add one
  • hello Nov 1, 2006 @ 22:30

    Also security nightmare is downloading rpms to /tmp and instaling them with rpm -ivh something_*_

  • 🐧 nixCraft Nov 1, 2006 @ 23:06

    That is why you need to use up2date or verify integrity of an RPM file.

    Appreciate your post.

  • Carlos S Oct 14, 2015 @ 21:28

    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.

  • Nessluv Mar 1, 2016 @ 3:53

    Thank you so much, it helped me installing tokenizer on my server ! AWESOME !

Leave a Reply

Your email address will not be published. Required fields are marked *

Use HTML <pre>...</pre>, <code>...</code> and <kbd>...</kbd> for code samples.