In this tutorial, we will show you how to install RPM Packages on CentOS. For those of you who didn’t know, RPM Package Manager (RPM) is a powerful package management system used by Red Hat Linux and its derivatives such as CentOS and Fedora. The official CentOS repositories contain thousands of RPM packages that can be installed using the
dnf command-line utility. Packages that are not available in the standard CentOS repositories can be easily installed by enabling the appropriate repository.
This article assumes you have at least basic knowledge of Linux, know how to use the shell, and most importantly, you host your site on your own VPS. The installation is quite simple and assumes you are running in the root account, if not you may need to add ‘
sudo‘ to the commands to get root privileges. I will show you through the step by step installation of the RPM Packages on CentOS Linux.
Install RPM Packages on CentOS
Step 1. First, let’s start by ensuring your system is up-to-date.
sudo dnf update
Step 2. Installing RPM packages with
Use YUM or DNF package manager to install the downloaded rpm file. This will help you to install dependencies required for the package:
sudo yum localinstall package-idroot.rpm ## Using yum command sudo dnf localinstall package-idroot.rpm ## Using dnf package
If for some reason you want to remove the installed package use the standard
dnf remove command followed by the package name:
sudo yum remove package-idroot.rpm ## Using yum command sudo dnf remove package-idroot.rpm ## Using dnf package
Step 3. Installing RPM packages with
rpm the command to install any packages on Redhat based systems. To install a package using
-i the command line switch followed by the package path on your system:
sudo rpm -i package-idroot.rpm
If you are upgrading from an earlier version of the software package, run RPM in upgrade mode, as in the following example:
sudo rpm -U package-idroot.rpm
The RPM installer can be used to remove (or uninstall) a software package. Enter the following into a terminal:
sudo rpm –e package-idroot.rpm
Congratulations! You have successfully installed RPM Packages. Thanks for using this tutorial for installing RPM Packages on your CentOS system. For additional help or useful information, we recommend you to check the official RPM website.