How To Install Yum Package In Linux

The Yellowdog Updater, Modified (YUM) is an open-source command-line package-management utility for Linux operating systems using the RPM Package Manager. It provides an automatic update and package installation/removal mechanism, which makes managing software on your system a breeze. Here is how you can install the YUM package in Linux:

Prerequisites

Before you begin, you need a running Linux system. YUM is generally pre-installed on many Linux distributions like CentOS and Fedora. However, if it not installed, or you need to upgrade to the latest version, follow the steps below.

Step 1: Check if YUM is already installed

Firstly, check if YUM is already installed on your system. To do this, you can simply try running the command yum in your terminal.

If YUM is installed, your terminal will list out all the options and commands available with YUM. If not, it will return an error message.

Step 2: Install YUM

If YUM is not installed on your system, or you wish to install a newer version, you can do so by compiling it from the source. Here are the steps you need to follow:

  • Download the latest YUM package: You can download the most recent version of the YUM package from its official source on GitHub.
  • Extract the package: After downloading, you need to extract the package with the following command: tar xvf yum-version.tar.gz
  • Change to the extracted directory: Navigate to the directory where the package is extracted using cd yum-version
  • Configure: Run the configuration script with the command: ./configure
  • Compile: Now, compile the source code using the make command: make
  • Install: Finally, install YUM using the make install command: make install
    wget https://github.com/rpm-software-management/yum/archive/yum-3.4.3-518.tar.gz
    tar xvf yum-3.4.3-518.tar.gz
    cd yum-yum-3.4.3-518
    ./configure
    make
    make install
    

Step 3: Verify Installation

After installation, verify whether YUM is correctly installed and working by running the command yum. If everything is working fine, it should show you a list of commands and options available with YUM.

Conclusion

That’s it! You have successfully installed YUM on your Linux system. With YUM, managing software on your Linux system will be much easier. You can now install, update, and remove packages on your system with simple commands.