FUNDAMENTALS A Complete Guide for Beginners
RPM, short for Red Hat Package Manager, serves as a primary tool within Red Hat-based distributions like RHEL, Fedora, and CentOS. This package management system facilitates effortless installation, updates, and removals of .rpm software packages within Unix/Linux environments. While YUM and DNF package managers are also prevalent, RPM remains useful for its control over installation. Today I will show you how to install a local .rpm package using the rpm command in Red Hat-based distributions.
To install a local RPM package or file, check the following command:
- Using rpm package manager:
rpm -i [package_name].rpm
- Using yum package manager:
yum localinstall [package_name].rpm
- Using dnf package manager:
dnf localinstall [package_name].rpm
Process Flow Chart to Install Local Package Using RPM
[Distro Used Throughout the Tutorial: RHEL 9.2]
Steps to Install Local Package Using RPM
Installing a local app package using the rpm package manager is a very simple task in Red Hat-based Linux systems. In this guide, I will navigate you through RPM’s local package installation procedure with 4 easy steps. If you want to know how to list installed packages using rpm check this fantastic article “How to List Installed Packages Using RPM”. For uninstalling an app package using rpm check this another detailed article “How to Uninstall RPM in Linux”. The steps to install local package using rpm is given below:
-
Before starting, download the .rpm package file for the app you want to install. You can usually find it on the official website of the app or in third-party repositories. You can also create the .rpm file from the .deb file using the alien package.
- Now, run the following command in the terminal to move to the directory where the .rpm file is located:
cd Downloads/
EXPLANATION- cd: This command changes the current directory to the destination directory.
- Downloads/: Name of the destination directory.
- After that, execute the following command to view all the files and folders in that directory:
ls
EXPLANATION- ls: List all files and folders of the current directory in the command line.
- Finally, run the following command to install your app package:
sudo rpm -i google-chrome-stable_current_x86_64.rpm
EXPLANATION- sudo: Permits administrative permission.
- rpm: Manages rpm packages in Red Hat-based distributions.
- i: This option specifies the rpm command to install the specified app package.
- google-chrome-stable_current_x86_64.rpm: .rpm file of the app package.
After installing the app package, your command line interface should look like the above image.
Conclusion
In this article, I have discussed the simplest way to install an app package from a local file using RPM in a Red Hat-based system. I hope this article has been helpful and you were able to install a package from a local file in your Linux system.
People Also Ask
How to install RPM local package with yum?
To install a local package in any Red Hat-based Linux system like RHEL, Fedora, and CentOS at first move to the download folder using cd Download/
then run sudo yum localinstall filename.rpm
or you can just run sudo yum localinstall path/filename.rpm
in the terminal. It will install the local package in your system using the Yum package manager.
How to use yum to install a package?
In Red Hat-based distributions yum is a very dependable package manager. You can keep an up-to-date Linux system using Yum. To install an app package using yum run sudo yum install package-name
in the terminal.
How do I list yum installed packages?
To list all installed packages using yum just run yum list installed
in your RPM-based distribution.
How to check installed package with RPM?
You can use rpm -qa
command to list all installed rpm packages. Or you can use rpm -q package_name
to list a particular package.
How to install an RPM package on Cent OS?
To install an RPM package on Cent OS, use the rpm command followed by the -i flag and the RPM’s file name. For instance, to install an RPM package called sample_package.rpm, run the command sudo rpm -i sample_package.rpm
.
Related Articles
- How to Show List of Installed Packages Using YUM [2 Cases]
- How to Check if Package is Installed Using YUM [3 Solutions]
- How to Install Specific Version of a Package Using YUM
- How to Install Local Package Using YUM [2 Practical Cases]
- 3 Ways to Install Pacman Package Manager in Ubuntu
- How to Install RPM Packages Using YUM [4 Interactive Cases]
- How to Install RPM Packages Using DNF [4 Useful Cases]
- How to Install Local Package Using DNF [2 Practical Cases]
- 2 Ways to Install Group Packages Using DNF [With Cases]
- 5 Ways to List Installed Packages in RHEL Using DNF With Cases
- How to Install RPM Packages From Text File [5 Simple Cases]
<< Go Back to Package Installation in Linux | Package Management in Linux | Learn Linux Basics