YUM (Yellowdog Updater Modified) holds its ground as a pivotal package manager in Red Hat-based distributions like RHEL, Fedora, CentOS, etc. It is built on top of the rpm package manager, providing an array of features that surpass the fundamentals of rpm. It simplifies package installation, handles dependencies, manages versions, and facilitates uninstallation, enhancing the user experience in Linux/Unix systems. In this guide, I will delve into how using the yum package manager you can install a specific version of an app package in Red Hat-based distributions.
Key Takeaways
- Learning the process of installing a specific version of an app package in your system.
Requirements
- A Red Hat-based distribution is required.
- Sudo privilege is required.
Process Flow Chart
[Distro Used Throughout the Tutorial: RHEL 9.2]
Steps to Install Specific Version of a Package Using YUM
YUM package manager is best suited to use in Red Hat-based Linux systems. Package installation is a vital part of package management. Sometimes you need to install a specific version of a package in your system. You can easily handle that task using the yum package manager in the Command Line Interface (CLI).
If you want to know how to install app packages using yum check this detailed article “How to Install RPM Packages Using YUM”. To check package installation using the yum command, check this simple article titled “How to Check if Package is Installed Using YUM”.
If you want to install a specific version of an app package in your Red Hat-based system using the yum package manager you can follow the below processes:
Steps to Follow >
➊ First, open the Terminal on your system.
➋ Next, type the following command to check all available versions of the app package in the remote repositories:
yum --showduplicate list php
- yum: Package manager in Red Hat-based distributions.
- showduplicate: Display duplicates (other versions) of the package in the output.
- list: This option can show all available and installed packages in your system.
- php: Name of the app package I want to install.
➌ After that, hit ENTER. The terminal will display all available versions of the app package from the remote repositories. It will look similar to the above image.
➍ Now, if you want to install a specific version from the list from the remote repositories then run the following command:
sudo yum install php-8.0.20-3.el9.x86_64
After executing this, the system will prompt you to enter your sudo user password, as shown in the following image. Provide your sudo password. Subsequently, the system will display your specified version of the app package, along with all the necessary dependencies.
➎ After that, press “Y” to confirm the installation as shown in the above image.
➏ Next, the system will automatically download and install your app package along with all of its dependencies, as illustrated in the image below:
Finally, You will complete the installation of the specific version of the particular app package on your system
Conclusion
In this article, I have discussed the simplest way to install a specific version of an app package by using the yum package manager in a Red Hat-based system. I hope this article has been helpful and you were able to install the specific version of a package in your Linux system.