You can Watch all our Tutorials and Training Videos for Free on ourYouTube Channel

How to Configure Local YUM Repo Server in Linux Easily

create local repository in rhel 7, configure local yum repo server in linux, configure local repo in linux, create local repository in linux

configure local yum repo server

In this tutorial, we will show How to Configureand Create Local YUM Repo Server in Linux. we will cover Network yum server in other articles, So Linux clients can be accessed via FTP, HTTP and NFS.

If you are interested in learning, Request you to go through the below recommended tutorial.

How to Configure Local YUM Repo Server in Linux

What is YUM?

YUM is a software package manager used for RPM management. YUM(Yellow-dog Updater and Modifier) is another and advanced way of installing the packages in Linux distro's such as Red-hat, Fedora and CentOS.

YUM make easier to resolve software dependencies automatically when we do install, update and remove RPM.


Whether you perform network installation or local yum repository, you need to dump your Linux OS from DVD.

As part of this article, we will mount the DVD on /media and copy all the DVD Content to local directory /data.
[root @learnitguide ~]# cp -rf /media/* /data

Create a file with repo as extension and specify the YUM details in /etc/yum.repos.d folder.
[root @learnitguide ~]# cd /etc/yum.repos.d/
[root @learnitguide ~]# vi testing.repo

Note : The directory /etc/yum.repos.d/ contaions two .repo files which should be removed or moved to other directory, so that YUM server will check default .repo file it self.Q. What if I don't move or remove the default .repo files from /etc/yum.repos.d/ folder?A: Every time when you try to install packages through YUM, your yum will check all these files for repositories for getting packages which will or will not work and most probably delay is increased in getting those packages from online servers.

The new file which is created contains as follows.
comment ="test"

After entering these entries save and exit from the file.

Let me explain what actually these four entries mean.

[RHEL_dvd] ==>This informs what is the repository name.

comment ==> Its used to see the information about the repo.

baseurl ==> This is the server and path of the repo(here its a local repo so the base url is just a file:///
For example, if you are creating YUM client through FTP then base url should be something like this


gpgcheck ==> This is to check the authentication of the repository, which is disabled in this case.

Local YUM repository is created, now you can install any package you want with yum command. In order to know more about YUM, Please see man pages for YUM.

Note:In-order to use yum repository we have to clean the yum meta data, so before installing any package first time use yum clean all command as shown below.
[root @learnitguide ~]# yum clean all

Ensure the status of the Repo:
[root @learnitguide ~]# yum repolist

Steps to Install the package:
[root @learnitguide ~]# yum install vsftpd

Thats it, you are done. We will cover about network yum server in upcoming articles.

Related Content on Linux might be useful to you to improve your Linux Skills.

Keep practicing and have fun. Leave your comments if any.

Support Us: Share with your friends and groups.

Stay connected with us on social networking sites, Thank you.
Cookie Consent
We serve cookies on this site to analyze traffic, remember your preferences, and optimize your experience.
It seems there is something wrong with your internet connection. Please connect to the internet and start browsing again.
AdBlock Detected!
We have detected that you are using adblocking plugin in your browser.
The revenue we earn by the advertisements is used to manage this website, we request you to whitelist our website in your adblocking plugin.
Site is Blocked
Sorry! This site is not available in your country.
whatsapp logo