banner



How To Use Rpm To Install A Package

Introduction

While working in Linux, you may have seen downloadable files with the .rpm extension. Rpm files are designed to exist downloaded and installed independently, exterior of a software repository.

This guide will testify you how to install a .rpm file to your Linux CentOS or Fedora system.

how to install rpm file on linux

Note: RPM Bundle Manager (RPM) is a free and open-source package management organisation for installing, uninstalling and managing software packages in Linux.

Prerequisites

  • A user business relationship with sudo privileges
  • Admission to a terminal window / command line (Card > applications > utilities > terminal, Ctrl-Alt-F2)
  • RPM, DNF, & YUM Package Managers (all included by default)

Step 1: Download RPM Installation File

Typically, a web browser is used to locate and download a .rpm file. However, if a browser is not available y'all tin still download a file if y'all know where information technology's located.

You may need to install a software tool called wget .

To install wget in CentOS, enter the following in a final window:

          sudo yum install wget        

To install wget in Fedora, enter the following:

          sudo dnf install wget        

Now, you can utilize the wget command to download the .rpm file you want. Enter the following:

          wget http://some_website/sample_file.rpm        

The system should reach out to the website and download the file to your electric current working directory.

Note: You lot can look up the accost of a particular .rpm file in a web browser on another system. Also, this is a handy fashion to install more recent software versions or special non-standard software. Also, take care when installing software packages! Brand sure you trust the source earlier you lot install. Usually, a developer will include a verification method to make sure you're getting accurate software.

Step 2: Install RPM File on Linux

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, y'all tin 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 electric current working directory for the installation file.

Note: YUM stands for Yellowdog Updater Modified. Normally, yum looks to your enabled software repositories for new software packages to install. More than recent verbiage suggests using install instead of localinstall, but it's up to you.

Install RPM on Fedora

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

          sudo rpm -i sample_file.rpm        

Simply equally in CentOS, the -i switch tells RPM to install the software.

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

          sudo dnf localinstall sample_file.rpm        

Unlike many Linux tools, DNF is not a fix of initials. It is merely the next evolution of the yum package managing director.

Remove RPM Parcel

The RPM installer can be used to remove (or uninstall) a software package.

Enter the post-obit into a terminal window:

          sudo rpm -e sample_file.rpm        

The -eastward option instructs RPM to erase the software.     Cheque RPM Dependencies

So far, this guide assumes the software either doesn't have dependencies or already has them installed.

To check the .rpm file for dependencies using the following command:

          sudo rpm -qpR sample_file.rpm        

The system should list all the dependencies:

  • -q – This pick tells RPM to query the file
  • -p – This pick lets you specify the target parcel to query
  • -R – This lists the requirements for the package

If at that place are whatsoever missing dependencies, you lot can install them from the standard repositories using yum or dnf. If your software requires other non-standard software, it will often be noted in the installation instructions.

Download RPM Packages from the Repository

One heady characteristic of the yum package manager is that it allows y'all to download .rpm files directly from the repository. This might exist helpful if you lot take limited bandwidth, or desire to re-create a single downloaded file betwixt systems. It could too help if y'all have intermittent internet admission, and you don't want to spend fourth dimension waiting for your installer to finish.

To download a .rpm file from the repositories, enter the following:

          sudo yumdownloader packagename        

If you wanted to download the files for Apache, for instance, you'd replace packagename with httpd. You tin can and then install the file as above.

Notation: In Linux, administrators find it helpful to take a single tool to manage software. That tool – called apackage manager – tin install software, keep track of software requirements, and rails updates and patches. Package managers too work withrepositories, which are secure and standardized libraries of commonly-used and well-supported applications. If you had to installwget in Step ane, that's an instance of installing from a repository.

Conclusion

In this tutorial, we covered iii different options for installing RPM files on Linux.

As with almost Linux software, your default package manager makes it unproblematic to track installations, updates, and prerequisites.

Was this article helpful?

Yes No

Source: https://phoenixnap.com/kb/how-to-install-rpm-file-centos-linux

Posted by: taylorbeated1958.blogspot.com

0 Response to "How To Use Rpm To Install A Package"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel