In this blog, we will learn about “What is YUM ?” and How to Install YUM in RHEL Linux with the local repository.
YUM is the primary tool for getting, installing, deleting, querying, and managing Red Hat Enterprise Linux RPM software packages from official Red Hat software repositories, as well as other third-party repositories. So let’s start to the point. You can also find Yum Commands Cheat Sheet at the end of this blog.
What is YUM?
YUM (Yellowdog Updater Modified) is an open-source command-line as well as a graphical based package management tool for RPM (RedHat Package Manager) based Linux systems. It allows users and system administrators to easily install, update, remove or search software packages on a system. It was developed and released by Seth Vidal under GPL (General Public License) as an open-source, which means anyone can be allowed to download and access the code to fix bugs and develop customized packages. YUM uses numerous third-party repositories to install packages automatically by resolving their dependencies issues.
General Configuration file of yum is located at /etc/yum.conf
You can see this file with any editor
Installation of Yum Server with local repository
We can install a local repository for YUM with DVD/ISO file. If you have DVD then Copy the entire Linux OS DVD’s content to Hard-drive. Insert DVD into DVD-RW and go to the mounting point of DVD.
To make a directory (folder) on root.
[root@localhost ~]# cd / [root@localhost /]# mkdir rhel7
To go on the mounting point of DVD. cd [Mounting Location]
[root@localhost ~]# cd /run/media/root/rhel-server-7/
Copy all entire Linux OS DVD’s into /rhel7 directory (folder)
If you have an iso file of Rhel OS then follow how to mount ISO image in rhel.
Go where there you have copied the entire OS DVD. To go on the Packages Directory. Then Install the createrepo package. To install package
It gives dependencies error. Then you have install depend packages
# rpm -ivh deltarpm-* # rpm -ivh python- deltarpm-*
Then you have to again install the createrepo package
To make “Createrepo” Database for the local repository which is used for YUM. Go to packages directory which is copied already. Go to the location of packages.
Create repo database
Create a file with repo as an extension and specify the YUM details in /etc/yum.repos.d directory (folder)
yum.repos.d this is a directory which contains all repository. now we create our new repo with any editor.
# vim rhel.repo [RHEL] name=local_repo baseurl=file:/rhel7/Packages/ :wq!
[rhel] :- Title of yum repo, name=rhel :- name of yum repo baseurl=file:/rhel7/Packages/ :- location of Rpm packages gpgcheck=0 :- verify rpm to RPM-GPG-key (gpgcheck=0 Disabal, gpgcheck=1 Enable)
Now we can create successful YUM repository, Verify run the yum command
# yum check # yum repolist all
Yum Commands Cheat Sheat
Click here to go the blog.