RPM is a package format and command to install packages in Linux operating systems. Fedora, RedHat, CentOS, and SUSE use the rpm package manager by default. You may not be using the rpm directly but the yum and dnf commands use the rpm packages and rpm command under the hood. We can use the rpm command in order to install RPM packages in a Linux system.
Install RPM Package with rpm Command
Installing an RPM package with the rpm command is very easy. We just provide the
-i option in order to install the specified RPM package. The RPM package path and name should be provided in the rpm command. In the following example we install the RPM package named
$ rpm -i httpd-2.0.46-32.ent.3.x86_64.rpm
We can also use them
--install instead of
-i option one below.
$ rpm --install httpd-2.0.46-32.ent.3.x86_64.rpm
The RPM package file location may be different than the current working directory. We should provide the path and package name properly like below if the package file is located differently than the current working directory.
$ rpm --install /home/ismail/httpd-2.0.46-32.ent.3.x86_64.rpm
Upgrade Already Install RPM
If the same RPM package is already installed with the previous version we should upgrade it instead of installing it. The
-U option is used to upgrade the RPM package by installing its new version.
$ rpm -U httpd-2.0.46-32.ent.3.x86_64.rpm
The installed RPM package can be removed with the
-e option by providing the package file.
$ rpm -e httpd-2.0.46-32.ent.3.x86_64.rpm
RPM File Repositories
The RPM packages are generally provided by the distributions and using the
dnf commands without event working with the package files. But not all RPM packages are provided by different distributions. We can download extra or 3rd party RPM packages via different websites where the
rpmfind.net is one of them. We can use the following link to access the RPM package repository and find RPM packages to install.