What is YUM
3.7 6 votes
Article Rating

What is YUM, i.e., YellowDog Update Modifier, is known to be the most popular package management system developed for the Red Hat family of Linux distributions. This package system, when used optimally; helps in setting-up, updating, and maintaining the infrastructure, in the most reliable and secure way.

We are living in a world where there is an ardent need for speedy development processes and anything that can provide solid product support. YUM, in this context, is known to be the command-line package management tool that is designed to provide necessary support for different Linux distributions. This tool is used to support the installation and management of any software on different Linux distributions, such as CentOS, Red Hat Enterprise Linux, and many others.

If you would like to do any activity on Linux systems, including installation, update, or removal of any package, YUM makes things easy and simple for you. This package is known for providing an easy-to-use interface that can process the management of repositories, dependencies, and even package groups. If you want to keep your software up-to-date, this YUM can be of great help to you.

What is Yum (Yellow Dog Update Modifier)

Yum is an RPM based server, we are using for package management. Through yum we can install, update, remove or search packages very easily. It is an open source management tool in Red hat. Its basic server, we need to configure in any organization where we are using Linux based OS, without yum rpm installation is not easy in Red hat, because of many dependency errors we are getting while installing RPM. Yum is used to resolve dependency errors. 

linux training in gurgaon

We can set-up local yum or dnf repository using the installation DVD or ISO file.

In RHEL 8, we have two package repositories to yum server.

  • BaseOS:- BaseOS repository we have all main OS packages 
  • Application Stream: – Application, Stream repository we have all application related packages, developer tools and databases etc.

Also learn here about What Is New Features In Red Hat Enterprise Linux 8

Role of YUM in Linux Distributions

YUM plays an important role in various Linux distributions. By automating the software installation, un-installation, and update, it keeps the system up-to-date and free from all sorts of vulnerabilities and dangers. This package management application helps in managing the dependencies that need to be cross-checked during the installation of any software.

For those who wish to manage their software packages effectively and efficiently, YUM is the best command-line tool available for them. However, there is a need to understand how one can install YUM on Linux and how its configuration is being done to make things happen automatically.

How To Configure YUM Server in Rhel 8?

For configuration of yum we need packages first. We can find all packages in DVD or ISO file.

1. Mount RHEL 8 DVD or ISO file

# mount /dev/cdrom /mnt  

2. Create a folder and Copy all DVD content into that folder   

# mkdir /Package
# cp –rv /mnt/* /Package

3. Copy media.repo file from mounted directory to /etc/yum.repos.d/

# cp -v /opt/media.repo /etc/yum.repos.d/rhel8.repo
Set “644” permission on “/etc/yum.repos.d/rhel8.repo

4. Add repository entries in “/etc/yum.repos.d/rhel8.repo” file

Edit rhel8.repo file.
vi /etc/yum.repos.d/rhel8.repo
[InstallMedia-BaseOS]
name=Red Hat Enterprise Linux 8 – BaseOS
metadata_expire=-1
gpgcheck=1
enabled=1
baseurl=file:///Package/BaseOS/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release


[InstallMedia-AppStream]
name=Red Hat Enterprise Linux 8 – AppStream
metadata_expire=-1
gpgcheck=1
enabled=1
baseurl=file:///Package/AppStream/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release

5. Clean Yum / DNF and Subscription Manager Cache 

#dnf clean all
#subscription-manager clean

6. Check whether Yum / DNF is getting packages from Local Repo

Use dnf or yum repolist command to verify whether these commands are getting packages from Local repolist

dnf repolist

Updating Subscription Management repositories.
Unable to read consumer identity
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
Last metadata expiration check: 1:32:44 ago on Sat 11 May 2019 08:48:24 AM BST.
repo id repo name status
InstallMedia-AppStream Red Hat Enterprise Linux 8 – AppStream 4,672
InstallMedia-BaseOS Red Hat Enterprise Linux 8 – BaseOS 1,658

 

To prevent message “This system is not registered with Red Hat Subscription Management. You can use the subscription-manager to register.” Go to /etc/yum/pluginconf.d/subscription-manager.conf”, changed the parameter “enabled=1” to “enabled=0”

[root@ssdntech~]# vi /etc/yum/pluginconf.d/subscription-manager.conf
vi /etc/yum/pluginconf.d/subscription-manager.conf
[main]
enabled=0

6. Installing packages using DNF / Yum

# dnf install package

It will show you Packages and its dependencies and ask you for confirmation about installing packages. Press “Y” if you want to install any package.

How is YUM installed on Linux?

There are various Linux distributions on which YUM is available. Some of them are Fedora, CentOS, etc. Among them, RHEL, i.e., Red Hat enterprise Linux-based distributions, can access Yum using its default commands i.e. by typing “yum –version”. 

To install YUM on the latest version of RHEL, you need to follow the following steps:

  1. Make your first step by moving to the RHEL 8 Linux CD. In case, you are using any virtual software, you can use the image file and move to the location using the below mentioned command:

/run/media/root/RHEL-8-0-0-BaseOS-x86_64/BaseOS/Packages/

  1. Next step is to find the location where your rpm is present. Open the terminal in the same folder and run the command.
  2. Once you locate the YUM and rpm package, you need to copy the name of the package. 
  3. Now type ‘yum’ on the terminal and press ‘enter’. 

Now that YUM is installed on your system, it’s time to look for its configuration steps.

How to configure YUM on Linux?

When it comes to configure YUM, you can use two methods to do so. Either you can opt for manual configuration or you can use some external software/program to process the same. 

Manual configuration steps:

Here are few steps to configure YUM manually:

1. Type this command and go to 

cd /etc/yum.repos.d/”. 

Here you will find some files with the ‘.repo’ extensions. You can either edit these files or add repository URL to them. 

2. Next step is to create the repository file. 

Type: gedit myyum.repo and you are done.

3. Before trying the third step, make sure to change your BaseOS CD-ROM name with RHEL-8-0-0-BaseOs-x86_64. Now do this coding:

[reponame1]    # this is repository name

  baseurl=file:///run/media/root/RHEL-8-0-0-BaseOS-x86_64/AppStream   #this is baseurl for the rhel 8 disk file

   gpgcheck=0     #this is to allow installation without any security check and delays.

   [reponame2]

   baseurl=file:///run/media/root/RHEL-8-0-0-BaseOS-x86_64/BaseOS  

   gpgcheck=0

Configuration steps using external software:

In place of doing the configuration process manually, you can use external software or programs to configure YUM. The external software or programs are capable to create those repository files and process the addition of base urls for different software and programs for any version of Linux. 

sudo dnf install –nogpgcheck https://download1.rpmfusion.org/free/el/rpmfusion-free-release-8.noarch.rpm

Nowadays, since nobody wants to burden up their responsibilities and everybody wants some quick hack to process these things, the configuration using external software is quite in demand. It makes the process easy and quick and allows a reduction in work. 

Package management solutions like YUM reduce the work of installing and managing the software or programs you want to use to quicken your work processes within the Linux stem. Using YUM is not at all difficult. 

With some easy-to-use commands, you can use it for managing packages on Linux or its systems. Commands such as update, install, remove, search, list, etc. are easy to use and apply. Just type yum [option] [command] [package], and here you go. 

YUM is known for simplifying package management in RHEL 8. It helps in smooth installations, aids in providing necessary updates, and also supports removing the software packages when not in use. Just learn how to install it and configure it properly, and here you go. It will certainly help you manage software on your RHEL systems.

3.7 6 votes
Article Rating

Sharing is caring!

You May Also Like

About the Author: SSDN Technologies

Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x