Home » How to create YUM Repository from ISO or Online

In this tutorial, you will learn how to create yum repository from ISO or online. The Yellowdog Updater Modified (YUM) is an Opensource tool that is used over the command line to manage package, it is also known as package management utility for the machine which is running a Linux Operating system using RPM package manager. Like YUM there are several tools used to manage packages in GUI.

On Linux yum is used as a command-line to install/remove/update/info the package.

In this tutorial, we will also we will show how to create yum repository from ISO or Online on your machine.

Steps to create a local YUM repository with ISO Image:

You can use ANY Linux – RHEL, CENTOS, MINT or Fedora, etc ISO Image.

Firstly create a directory

$ mkdir /packages

Now mount the ISO file, follow below command to do this:

$ mount -t iso9660 -o loop /home/user11/Centos-6-x86_x64-DVD.iso /mnt/iso/

Copy the packages from ISO to /packages dir, Once you have copied it then install the required package for creating yum repo.

Goto /packages dir and follow below command:

$ rpm –ivh deltarpm $ rpm –ivh python-deltarpm $ rpm –ivh createrepo

After installing these packages now we will create repo file.

Goto /etc/yum.repos.d/ and created one file with name local-Linux.repo (you can give any name),

$ vi /etc/yum.repos.d/local-linux.repo [LOCAL REPO] Name=Local Linux Repo baseurl=file:///packages gpgcheck=0 enabled=1

Save this file and now create repo data:

$ createrepo –v /packages $ yum clean all

Clear the cache and run repo list:

$ yum repolist

When you fire repo list command you can see your repository also “local-linux.repo”

Step to create yum repository by using the online repo

This process is similar to local repo only that you will create repo file with repo URL where all packages are available.

$ rsync –avz rsync://mirror.fibergrid.in/centos/7.2/os/x86_64/Packages/s/ /YUM

Here internet speed must be good, create repo dir

$ createrepo – v /packages

This repo is ready to use. End of the tutorial, How to create YUM Repository from ISO or Online.

Thanks for reading this article, you’ll also like to read below articles.