How to configure yum server

how to configure yum server

Hello friends, in this article we are going to learn how to configure the YUM server step by step. If you have any questions please write in the comment box.

What is yum and how do I use it?

Configure Yum server (yellow-dog updater modified) it’s a package manager for rpm management, yum server makes it easy to install, update, remove RPMs.

Configure Yum Server step by step

We need RHEL 6 DVD or ISO file, mount it with your system, all media automatically mounted with Media folder.

After mounted the media, you need to find the Packages folder inside your media. In my case, the Packages folder location is below.

#cd /media/RHEL_6.2\ x86_64\ Disc\ 1/Packages/

NOTE:- For Yum server installation we have required these three RPM, Listed below.

  • deltarpm
  • python-deltarpm
  • createrepo

Now install all above rpm’s, using below steps.

rpm -ivh deltarpm
rpm -ivh python-deltarpm
rpm -ivh createrepo

After installing all the above rpm’s, Now make a directory for the yum server repository using mkdir command. You can give any name to this directory and create it in the Home directory of ROOT user. This directory contains all rpm’s which is we are copying in this directory and it also holds the database file of yumserver follow the below steps.

mkdir /yumserver

The below command configure yum server database

Now going in Packages directory which is in your DVD or ISO, then copy all rpm files from Packages folder into yumserver directory follow below steps.

After copying all rpm’s then going into yumserver directory using cd command and then run createrepo command for creating Database for yum server, in this command we are using dot (.) it means current location of your on terminal, you can check your current location using ‘pwd‘ command it means present working directory. For this please follow bellow steps.

#cd /yumserver/
#createrepo -v .

Create .repo file for yum configuration

Now going in yum.repos.d directory using cd command for creating a .repo file.

cd /etc/yum.repos.d

Then make a file using VIM editor which is name is yumserver.repo. For this file, you can give any name but the extension must be “.repo” it’s required.

vim yumserver.repo

Then press ‘I’ for insert mode and then write below line in this file.

[yumserver]
name=yumserver
baseurl=file:///yumserver
enabled=1
gpgcheck=0

Then press esc button and then shift+:wq for saving changes.

Now run below command for checking yum server configuration is done or not if it’s run successfully so your yum server configured successfully.

yum repolist

Connect with me on:

Instagram: https://www.instagram.com/shripaldba
Linkedin: 
https://www.linkedin.com/in/shripal-singh
Twitter: 
https://twitter.com/ocptechnology
Facebook: 
https://www.facebook.com/ocptechnology
YouTube:
https://www.youtube.com/ocptechnology

6 thoughts on “How to configure yum server

Leave a Reply

Your email address will not be published. Required fields are marked *

Scroll to Top