How to install RPM packages on CentOS Linux

RPM Package Manager (RPM) is a powerful package management system, which is used by RedHat Linux and its derivative versions such as CentOS, Fedora, etc. RPM is associated with rpm command and .rpm file format.

The CentOS software source contains thousands of rpm packages. These software packages can be installed using desktop software management tools or by using the command line yum, dnf and rpm tools. Some libraries and applications are packaged in rpm format, but are not included in any CentOS software source repositories. Those applications need to be manually downloaded from the developer's website and need to be installed manually.

In this guide, we will explain how to install rpm files on CentOS.

When you install rpm packages from unofficial sources, you need to be extra careful. This package must be built for your system architecture and CentOS version. Never replace or update basic system software packages, such as glibc, systemd, or other services or tools. These are the basic software to ensure the normal operation of the system.

Only as root or another user with sudo privileges can install or remove RPM packages.

1. Use yum and dnf to install rpm files##

Both yum and dnf are command-line tools, they are used to install, upgrade, remove and manage rpm packages in CentOS and other Linux distributions.

Starting from CentOS 8, dnf will replace yum as the default package management tool, and dnf is backward compatible with yum.

You can continue to use yum on CentOS 8, because it is an alias of dnf.

To use yum and dnf to install a local rpm package, use the install command and add the local path of the file. In this example, we will install Chrome Browser:

sudo yum install google-chrome-stable_current_x86_64.rpm
sudo dnf install google-chrome-stable_current_x86_64.rpm

Both yum and dnf will resolve and install all dependent packages. If prompted, enter Y to continue:

...
Install  69 Packages

Total size:45 M
Total download size:28 M
Installed size:292 M
Is this ok [y/N]:

That's it, the application has been installed on your system and you can start using it.

You can also install a rpm package directly from a URL address:

sudo yum install https://dl.google.com/linux/direct/google-chrome-stable_current_x86_64.rpm
sudo dnf install https://dl.google.com/linux/direct/google-chrome-stable_current_x86_64.rpm

2. Use rpm to install rpm file##

rpm is a low-level software management tool on RHEL system.

You should always use yum and dnf instead of rpm to install, upgrade, and remove packages, because rpm will not solve dependency problems.

To install the rpm package using rpm, please use rpm plus -i (or -U) option plus file path:

sudo rpm -i google-chrome-stable_current_x86_64.rpm

If the package you are installing or upgrading depends on other packages that are not installed, rpm will display a series of missing dependent software. You need to install all the dependent software yourself.

` rpm also accepts to install packages via URL:

sudo rpm -i google-chrome-stable_current_x86_64.rpm

Three, summary##

On CentOS systems, you can use yum or dnf to install a local rpm file, just like you install from a software source.

Recommended Posts

How to install RPM packages on CentOS Linux
How to install MySQL on CentOS 8
How to install Memcached on CentOS 8
How to install R on CentOS 8
How to install FFmpeg on CentOS 8
How to install Virtualbox on CentOS 8
How to install TensorFlow on CentOS 8
How to install TeamViewer on CentOS 8
How to install Perl 5 on CentOS
How to install Git on CentOS 8
How to install Gradle on CentOS 8
How to install Elasticsearch on CentOS 8
How to install Jenkins on CentOS 8
How to install Java on CentOS 8
How to install Go on CentOS 8
How to install GCC on CentOS 8
How to install Yarn on CentOS 8
How to install Nginx on CentOS 8
How to install Asterisk on CentOS 7
How to install Jenkins on CentOS 8
How to install Vagrant on CentOS 8
How to install Python 3.8 on CentOS 8
How to install Tomcat 9 on CentOS 8
How to install Webmin on CentOS 8
How to install Ruby on CentOS 8
How to install Skype on CentOS 8
How to install htop on CentOS 8
How to install Python on CentOS 8
How to install Elasticsearch on CentOS 8
How to install Postgresql on CentOS 8
How to install Wordpress on Centos
How to install htop on CentOS 8
How to install TeamViewer on CentOS 8
How to install MariaDB on CentOS 8
How to install MongoDB on CentOS 7
How to install Odoo 13 on CentOS 8
How to install Apache on CentOS 8
How to install OpenCV on CentOS 8
How to install PHP on CentOS 8
How to install MongoDB on CentOS 8
How to quickly install docker on Linux (Centos version)
How to install Apache Maven on CentOS 8
How to install Apache Kafka on CentOS 7
How to install MySQL on Ubuntu 18.04 (linux)
[Graphic] How to install tomcat on centos
R&D: How To Install Python 3 on CentOS 7
How to install GCC compiler on CentOS 7
How to install offline JDK1.8 on centos7.0
How to install and configure Elasticsearch on CentOS 7
How to install Visual Studio Code on CentOS 8
How to install and use Docker on CentOS 7
How to install and configure VNC on CentOS 8
Linux (CentOS7) using RPM to install mysql 8.0.11 tutorial
How to install and use Composer on CentOS 8
How to install and configure Redis on CentOS 8
How to install Node.js and npm on CentOS 8
How to install jdk1.8.0_151 and mysql5.6.38 on centos7.2.1511
How to install and configure phpMyAdmin on CentOS 6
How to install and use Curl on CentOS 8
How to install and configure Owncloud on CentOS 8
How to install VirtualBox client extension on CentOS 8