Method 1: Install RPM packages with RPM
RPM Package Manager (RPM) is a free powerful command line driven package management system capable of installing, uninstalling, verifying, querying, and updating computer software packages.

To install an RPM package with the rpm tool use the -i flag which represents “install” preceding the RPM package name:

sudo rpm –ivh name_of_file.rpm

Note that if the package to be installed depends on other packages which you do not have installed already, rpm will display a list of all the missing dependencies. You will then have to manually download and install all dependencies before using the package you originally installed.

Updating a package with rpm is done with the use of -U flag which represents “update” preceding the RPM package name:

sudo rpm –Uvh name_of_file.rpm

Removing a package with rpm is done with the use of the –e flag which represents `"Erase" preceding the RPM package name:

sudo rpm –e name_of_file.rpm

Method 2: Install RPM packages with YUM
Yum is a free and open-source command-line package-management utility for computers running the Linux operating system. It is the default package manager tool in CentOS. Its functionalities include installation, removal, download, querying and updating packages from the official CentOS repositories and other third-party repositories.

The first step is to download the RPM file to be installed

wget https://file_domain.com/name_of_file.rpm

To install the package, issue the yum localinstall command preceding the RPM package name:

sudo yum localinstall name_of_file.rpm

Yum will prompt you for confirmation. Type y to confirm and the RPM package will be installed.

Note that if the package to be installed depends on other packages which you do not have installed already and if those packages are available in the repositories enabled on your system, yum will install all dependencies.

If the packages are unavailable, yum will print a list of all the missing dependencies to which you will have to download and manually install those packages.

Removing an rpm package installed with yum is done with the standard yum remove command preceding the RPM package name:

sudo yum remove name_of_file.rpm