FUNDAMENTALS A Complete Guide for Beginners
YUM (Yellowdog Updater Modified) is a command-line package management tool used in Red Hat-based Linux distributions such as RHEL, Fedora, CentOS, etc. It simplifies the process of installing, updating, and removing software packages on the Linux/Unix system. This package manager can efficiently handle dependencies during installations. It is also possible to install single or multiple app packages or even group packages from remote software repositories. YUM enhances user experience by streamlining package management tasks and ensuring software consistency and stability. In this article, I will show you how to use the yum package manager to install rpm app packages or rpm group packages or install an app package from a specific remote repository in Red Hat-based distributions.
The following flow chart shows the general process of installing app packages using Yum package manager:
[Distro Used Throughout the Tutorial: RHEL 9.2]
4 Cases of Installing RPM Packages
The process of installing an app package using the yum package manager is straightforward on any Red Hat-based Linux system. In this article, I will guide you through the step-by-step process of package installation using yum. If you want to know how to uninstall an app package using yum check this beginner-friendly article “How to Uninstall a YUM Package”.
Case 1: Install an RPM Package Using YUM
If you want to install a single app package in Red Hat-based distributions, using the yum package manager you will be able to do that very easily by following some simple steps. If you want to install an app package with a specific version using yum check this simple article “How to Install Specific Version of a Package Using YUM”. To install an app package using yum:
- First, open your terminal and run the following command to search for the app package you want to install:
sudo yum search chrome
EXPLANATION- sudo: Permits administrative permission.
- yum: Package manager in Red Hat-based distributions.
- search: Search for the app package in the remote repository using yum.
- chrome: Name of the package I want to install.
If you are asked for the sudo user’s password, provide it. After that, you will see results similar to the above image in your terminal. If you do not see your desired app package in the list then follow the instructions of this detailed article “How to Install Local Package Using YUM”
- Now, execute the following command to install your desired app package:
sudo yum install google-chrome-stable
EXPLANATION- install: Install an app package from the remote repository using yum.
- google-chrome-stable: Exact name of the app package I want to install.
-
After that, press “Y” to confirm the installation as shown in the image above. Then your desired app package will be downloaded and installed automatically afterward. After installation is complete you will get a confirmation message like the following image. If you want to check if a package is installed using yum check this step-by-step article “How to Check if Package is Installed Using YUM”.
Case 2: Install Multiple RPM Packages Using YUM
In case you want to install multiple rpm app packages altogether in Red Hat-based distros, the yum package manager can very easily handle that task. Here is a step-by-step process on how you can install multiple app packages using the yum command:
-
First, you need to check whether the packages are available in the remote repository or not. To do so you can run the following commands:
sudo yum search mysql
sudo yum search php
sudo yum search vsftpd
EXPLANATION- mysql/php/vsftpd: Name of the app packages I want to install.
-
Now, execute the following command like the above image to install your desired app packages altogether:
sudo yum install mysql php vsftpd
-
Next, press “Y” to confirm the installation, as demonstrated in the image above. The chosen app packages will subsequently be downloaded and installed automatically. Upon completion, a confirmation message similar to the image below will be displayed. If you want to know how to list all installed packages using yum check this simple article “How to Show List of Installed Packages Using YUM”.
Case 3: Install Group Package Using YUM
In Red Hat-based distribution using the yum package manager, you can install one or multiple apps simultaneously. There is another way to install a group of apps that are related to each other with a single command.
Usually, all the app packages in the same group are bundled together because they serve a similar purpose like ‘System Tools’, ’Security Tools’, ‘Scientific Support’, ‘Development Tools’, etc. The process of finding these groups and installing them is as follows:
-
First open your terminal and run the following command to check for all available groups in the remote repository:
sudo yum grouplist --available
Or,
sudo yum groups list --available
EXPLANATION- grouplist/ groups list: list all groups in the remote repository.
- available: Name of the groups that are available for you.
Provide the sudo user’s password. Then you will see the list of all available groups like the above image.
-
Now, execute the following command to list all app packages in a group. Your terminal will look like the next image:
sudo yum groupinfo "Development Tools"
Or,
sudo yum groups info "Development Tools"
EXPLANATION- groupinfo/ groups info: List all app packages present in a specific group.
- Development Tools: Name of the group I want to install.
-
Then, run this command to install a group in your system using the yum command:
sudo yum groupinstall "Development Tools"
Or,
sudo yum groups install "Development Tools"
EXPLANATION- groupinstall/ groups install: Install a specific group.
- Development Tools: Name of the group I want to install.
The installation process will start and your terminal will look similar to the above image. In case you want to exclude a package while installing a group run the following command instead:
yum groupinstall --exclude=gcc "Development Tools"
EXPLANATION- exclude: Exclude specific app packages while installing a specific group.
- gcc: Name of the package I am excluding while I am installing a group.
-
After that, press “Y” to confirm the group installation as shown in the image above. All app packages of the group will be downloaded and installed automatically. This process will take some time. After the group installation is complete you will get a confirmation message like the following image.
Case 4: Install App Package from a Specific Repository Using YUM
Sometimes, you need to install a specific app package from a particular repository. You can easily do that in a Red hat based distribution using the yum package manager. To do so follow:
-
First open your terminal and run the following command to search for the app package you want to install:
sudo yum --enablerepo=epel install audacity
EXPLANATION- enablerepo: Enable a specific repository while executing this command.
- epel: Specific repository I want to use.
- audacity: Name of the package I want to install.
Note: You need to have the specific remote repository you want to use installed beforehand. To add the epel remote repository in your Red Hat-based distro run this command:sudo yum install https://dl.fedoraproject.org/pub/epel/9/Everything/x86_64/Packages/e/epel-release-9-5.el9.noarch.rpm
Or, you can download the latest version of the EPEL release from the Fedora Project and then install that RPM file using yum.
Then provide the sudo user password. You can see that the app package is listed from your desired repository. If a dependency is present in your desired repository then it will use that repository or else it will use the default repository for solving dependencies.
-
After that, press “Y” to confirm the installation as shown in the image below.
-
Then the app package download and installation process will start afterward. After installation is complete you will get a confirmation message like the following image.
Conclusion
In this article, I have discussed how you can easily install app packages from the remote repository in a Red Hat-based system using the YUM package manager. I am optimistic that this guide will prove beneficial and empower you to seamlessly install packages on your Linux system.
People Also Ask
How to install an RPM package on Linux?
To install an RPM package on Linux, the command you use depends on your package manager. For example, for the RPM package manager rpm -i path/file.rpm
, for the Yum package manager yum install package_name
, and for the dnf package manager dnf install package_name
command is used for installing an RPM package in Red Hat-based distros.
How to install the yum command in Linux?
In Red Hat-based distributions yum is a very dependable package manager. If you want to install yum in Debian-based Linux distros run sudo apt install yum
in the terminal. If you install yum in Arch Linux-based distro then run sudo pacman -S yum
in the terminal.
How to install a local file with yum?
To install a local package in any Red Hat-based Linux system using yum, 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 do I install a package in Linux?
Depending on the Linux distribution and package manager the command changes to install a package in Linux. The sudo apt install package_name
is used in Debian-based Linux, sudo dnf install package_name
is used in Red Hat-based distribution, and for Arch Linux sudo pacman -S package_name
is used to install an app package using a terminal.
Related Articles
- How to List Installed Packages Using RPM [2 Practical Cases]
- 3 Ways to Install Pacman Package Manager in Ubuntu
- How to Install Local Package Using RPM [A Quick Guide]
- 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