Portal Home > Sentris Forum > Tutorials > Anything > How to Install RPM Packages on CentOS

How to Install RPM Packages on CentOS

Carol Frye
Offline
Topics: 1
Replies: 2
Joined: 04/06/2020

RPM is a packaging system used by Red Hat and its derivatives such as CentOS and Fedora.

 

The official CentOS repositories contain thousands of RPM packages that can be installed using the yum command-line utility. Packages that are not available in the standard CentOS repositories can be easily installed by enabling the appropriate repository.

But not all software vendors provide a yum repository for their application. Most often in, those situations, they will have a download page from where you can download and install the RPM package or download and compile the software from sources.

yum is the default package manager tool in CentOS. It is used to install, remove, download, query, and update packages from the official CentOS repositories as well as other third-party repositories.

Installing RPM packages with yum 

The first step is to download the RPM file that you want to install:

     wget https://example.com/file.rpm

To install the package, use the yum localinstall command followed by the path to the package name:

     sudo yum localinstall file.rpm

yum will prompt you for confirmation. Answer y and the RPM package will be installed, assuming it's compatible with your system, and all dependencies are met.

 

If the RPM package depends on other packages that are not currently installed, and if those packages are available in the repositories enabled on your system, yum will install all dependencies. Otherwise, yum will print a list of all the missing dependencies you will have to download and manually install those packages.

Instead of downloading and then installing the RPM package you can simply pass the URL to the RPM package to the yum localinstall command:

    sudo yum localinstall https://example.com/file.rpm

To update an RPM package that it is already installed with yum, use the same procedure as when installing the package.

If for some reason you want to remove the installed package use the standard yum remove command followed by the package name:

   sudo yum remove file.rpm

Here are all that how to install RPM packages on CentOS.

Have a nice day.

04/06/2020 17:10:22

Kevin Young
Offline
Topics: 4
Replies: 30
Moderator

Than you for sharing, we've doubled your RAM for free. smiley

04/06/2020 19:08:24