Yum Configuration in Redhat Linux
- Subhabrata Datta

- Jun 27, 2020
- 1 min read
What's Yum in Linux ? How to Configure Yum in Redhat Linux 8 ? Few Yum Commands!
Introduction
Yum is used to manage software packages in Redhat Linux. We can install, list, upgrade and remove software packages in Redhat Linux. Rpm could also be used to install software packages however the advantage of using yum is that yum knows how to resolve dependencies.
Before we could use yum to install softwares, we need to configure yum i.e we need to tell yum where are the software repositories or where the software is located. The software repositories could be either online or in the local drive.
Configuring Yum
The Redhat iso file or dvd file contains many software packages. And it is located in /dev/cdrom. Mount it on a folder.
mkdir /dvd
mount /dev/cdrom /dvdOnce mount is done, you would be able to see appstream and BaseOS

We need to create a ".repo" file inside folder /etc/yum.repos.d/. We could create multiple repos which will contain online or local location of the software packages.
The filename could be anything but must end with ".repo".
vi /etc/yum.repos.d/dvd.repodvd.repo contents
[dvd1]
baseurl=file:///dvd/AppStream
gpcheck=0
[dvd2]
baseurl=file:///dvd/BaseOS
gpcheck=0Use Esc+:x to save file and quit from vi editor.
Check if yum is configured correctly using yum repolist command.
Installing packages using yum install command (here we have installed net-tools and vim package)
yum install net-tools vim

Comments