Cheap VPS host selection
Provide server host evaluation information

How to install rpm on Linux

The method for Centos to install the rpm package: first download and install the RPM file; Then follow the path of the software package name with the yum localinstall command; Then if the RPM software package depends on other software packages that you have not installed, all dependencies will be installed; Finally, pass the URL to the RPM package.

1、 Installing the RPM package using YUM

Yum is the default package manager tool in CentOS. It is used to install, delete, download, query and update software packages from the official CentOS repository and other third-party repositories.

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

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

To install the software package, follow the path of the software package name with the yum localinstall command:

sudo yum localinstall file.rpm

Yum will prompt you for confirmation. Assuming that it is compatible with your system and meets all dependencies, enter y to install the RPM package.

If the RPM package depends on other packages that you have not installed, and these packages are available in the repository enabled on your system, all dependencies will be installed. Otherwise, yum will print a list of all missing dependencies that you must download and manually install these packages.

You can directly pass the URL to the RPM package, instead of automatically downloading and installing the RPM package yum localinstall:

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

If you want to update an RPM package that has been installed using yum, use the same procedure as when installing the package.

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

sudo yum remove file.rpm

2、 Installing RPM Packages Using RPM

RPM is a low-level tool that can be used to install, uninstall, and upgrade RPM software packages.

To install the RPM package using the rpm tool, use the installation option - i followed by the RPM package name:

sudo rpm –ivh file.rpm

If the package depends on other packages that you have not installed, rpm displays a list of all missing dependencies. You must manually download and install all dependencies.

You can skip the download section and provide the RPM package URL for the rpm command:

sudo rpm –ivh https://example.com/file.rpm

When using the update package rpm, please use - U for the "update" option:

sudo rpm –Uvh file.rpm

To delete a package using this rpm command, use the – e (erase) option, followed by the package name:

sudo rpm –e file.rpm

The above is the detailed explanation of the rpm installation tutorial under the Linux centos system.

Do not reprint without permission: Cheap VPS evaluation » How to install rpm on Linux