There are certain objects in Linux that allow us to perform certain tasks of administration and process control and one of them are the RPM files, an RPM file (Red Hat Package Manager), is a file used for the storage of installation packages in operating systems Linux, as well as updating these..
RPM can be used with package managers such as Yum or DNF to make downloading and installation tasks as complete as possible. From this point of view, RPM files offer the user and administrator an easy way to distribute, install, update or delete software because the files are packaged in a single location.
What is RPM?
An RPM file is an element of Red Hat whose purpose is to save installation packages within Linux. With these rpm files it will be much easier to manage the software since we have them encapsulated in a single site. When reinstalling a system or even removing it, an RPM file will make the task easier. Although rpm files cannot be used on other systems such as Windows, we can use a decompression program to view their content.
RPM being Red Hat, its use will be essential in distributions such as CentOS, Fedora or Red Hat and in the other distributions we can make use of .deb packages..
TechnoWikis will explain how to install an RPM file on Linux and in this case we will use CentOS 8.
1. How to install RPM using Yum on Linux
By default, if we install a package from a repository using the yum command, the "yum install package" syntax will be executed resulting in the download of the RPM file from its official repository, but it is possible to use the "yum install file.rpm" syntax. in order to specify a local RPM file to install. For this example we are going to install Google and to make this possible we must first download the RPM from the official site since it will be used locally.
Step 1
Once we have the RPM file we will execute the following in this case:
yum install ./Google-chrome-stable_current_x86_64.rpm
Step 2
In this case, you will be asked to enter the letter "s" to confirm the download and installation of the file:
Step 3
Press Enter and the installation process will take place:
Step 4
After this the RPM file installation process will be completed:
With this process, the RPM file will be installed together with their respective dependencies..
2. How to install DNF using Yum on Linux
Another option available to use is with the DNF command which is another package manager in Linux.
Step 1
Installation is required by running:
yum install dnf
Step 2
After this, with the RPM file downloaded, we will execute the following in this case for Apache:
dnf install httpd-2.4.6-90.el7.centos.x86_64.rpm
Step 3
We accept the download and installation of the package with the letter "S":
3. How to use RPM on Linux
By default, in Linux we can directly use rpm for the installation of the RPM files with the -i parameter but this method will not automatically resolve the package dependencies, we will see the following. This implies having to install the dependencies manually taking more time.
With YUM or DNF it will be possible to install the RPM files on Linux in a reliable and complete way.