Unix/Linux Guru and FOSS supporter

Linux Repository Management using mrepo

mrepo is used for managing repositories from ISO image. It also downloads updates packages from third party repositories. You can also use this utility for network Linux installation. In this article we will learn Linux Repository Management using mrepo.

First, Add the IP and name in hosts file.

nano /etc/hosts

Add the following lines: mrepo

save and close the file.

Similarly repeat above step but this time in network configuration file.

nano /etc/sysconfig/network

Add the following lines: mrepo

save and exit from the file.

Install the following dependency for mrepo so that we can create repositories as per our need.

yum -y install createrepo

Now Install following packages to support different kinds of mirrors:

yum -y install rsync lftp

Before the installation of mrepo install EPEL release for CentOS Stream 8.

rpm -Uvh

Now, clone the official mrepo installation files from its git repository using the following command:

git clone

Run the following command to install mrepo:

make install

Now Edit the mrepo configuration file:

nano /etc/mrepo

Set the directories as shown in the above image.

Now create a file in /var/mrepo as follows:

mkdir /var/mrepo/puppetserver

Now, Create the file under /etc/mrepo.conf.d/

nano /etc/mrepo.conf.d/puppetserver

Add the following lines:

name = CentOS Server $release ($arch)
release = 8
arch = x86_64
metadata = repomd yum repoview
### URL
Baseurl =
Repository Management
Repository Management

Now start mrepo service using the following command:

service mrepo start

Run the following command to update repositories:

mrepo -uvv

mrepo installation is now complete you can sue it to create repositories according to your need.


Please enter your comment!
Please enter your name here

Latest articles

Join us on Facebook