how to install rpm package in centos?

1 Answer(s)

Install RPM File Using RPM Command

To install a .rpm package in CentOS Linux, enter the following:

sudo rpm -i sample_file.rpm

The -i switch tells the package manager you want to install the file.

More information on the RPM installer can be found in the RPM documentation.

Install RPM File with Yum

Alternately, you can use the yum package manager to install .rpm files.

Enter the following:

sudo yum localinstall sample_file.rpm

The localinstall option instructions yum to look at your current working directory for the installation file.

 

Install RPM on Fedora

To install an .rpm package on Fedora Linux, enter the following:

sudo rpm -i sample_file.rpm

Just as in CentOS, the -i switch tells RPM to install the software.

Another method is to use the dnf utility to install the package:

sudo dnf localinstall sample_file.rpm

Unlike many Linux tools, DNF is not a set of initials. It is merely the next evolution of the yum package manager.

Answered on September 1, 2021.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.