How to install rpm package on Linux
What is an RPM?
A Red Hat Package Manager is a default open source package management utility for Red Hat based systems like (RHEL, CentOS and Fedora). The tool allows system administrators and users to install, update, uninstall, query, verify and manage system software packages in Unix/Linux operating systems. RPM formerly also known as .rpm file, that includes compiled software programs and libraries needed by the packages. This utility only works with packages that built on a .rpm format. Even though it was created for use in Red Hat Linux, RPM is now used in many Linux distributions. It has also been ported to some other operating systems, such as Novell NetWare (as of version 6.5 SP3) and IBM’s AIX (as of version 4).
Package filename and label
An RPM is delivered in a single file, normally in the format:
(name)-(version)-(release).(architecture).rpm
such as:libgnomeuimm-2.0-2.0.0-3.i386.rpm
where (name) is libgnomeuimm, (version) is 2.0, (release) is 2.0.0-3, and (architecture) is i386.
Installing RPM package.
Open a terminal and then type the following command:
$rpm -ivh file-name.rpm
Please note that you need to log in as root, or use the su (sudo) command to change to the root user to install the software using rpm command:
$ su -
Install RPM package
To install an rpm file called awstats.i386.rpm, enter:
$ rpm -ivh awstats.i386.rpm
Note: you can download the package in rpm format from the official project web pages or public FTP servers.
Upgrade RPM package
Type the following command:
$rpm -Uvh awstats.i386.rpm
If you are upgrading from an earlier version of the software package, use upgrade mode command as described above.
To find list of all install packages, enter:
$ rpm -qa $ rpm -qa | less $ rpm -qa | grep something Sample outputs: comps-extras-11.1-1.1 libattr-2.4.32-1.1 libidn-0.6.5-1.1 grep-2.5.1-55.el5 libxslt-1.1.17-2.el5_2.2 perl-Digest-SHA1-2.11-1.2.1 time-1.7-27.2.2 libdaemon-0.10-5.el5 .... ..... .. mysql-server-5.0.77-4.el5_5.5 mysql-devel-5.0.77-4.el5_5.5 samba-client-3.0.33-3.29.el5_6.2 pcre-6.6-6.el5_6.1 yum-rhn-plugin-0.5.4-17.el5_6.1 libtiff-3.8.2-7.el5_6.7 nash-5.1.19.6-68.el5_6.1 quota-3.13-5.el5 xorg-x11-server-Xorg-1.1.1-48.76.el5_6.4 xorg-x11-server-Xnest-1.1.1-48.76.el5_6.4
Erase (Delete) RPM package (package)
Type the following command:
$ rpm -ev packagename
To remove samba-client-3.0.33-3.29.el5_6.2, enter:
$rpm -ev samba-client-3.0.33-3.29.el5_6.2
See our rpm command cheat sheet for more information or read the man page:
$ man rpm
A Note About yum Command
The yum command act as an interactive, rpm based, package manager. It can automatically perform system updates and install or remove packages. It is recommended that you use the yum command as described here for package management.
Very Helpful.