How to Configure Local YUM Repo Server in Linux Easily


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.

ALSO WATCH THIS YUM SERVER CONFIGURATION TUTORIAL VIDEO FREE ON OUR YOUTUBE CHANNEL

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.
[RHEL_dvd]
comment ="test"
baseurl=file:///data
gpgcheck=0

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

baseurl=ftp://ip_address/pub/Server

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.

إرسال تعليق

1 تعليقات

  1. […] to configure the DNS Server on RHEL7 / CentOS7.3. Yum repo enabled, refer this link to Configure YUM Repo Server on Linux.4. Internet connection needed if you prefer to install DRBD software through internet. If you are […]

    ردحذف