Table of Contents

How To Create a Yum/Dnf Repository Mirror

Assumptions for this tutorial:

Step 1: Create the mirror

Use reposync and createrepo to download and create the mirror.

Step 2: Script it!

Put above commands into a shell script so it's easily automatable. Bonus points for adding it to cron!

Step 3: Install Apache

Now that your repos are downloaded and ready to serve, you need a way of serving those packages to your systems. There are several ways around this, but today we're going to go the old-school route by installing the https://www.apache.org to serve HTTP(S) clients.

So get started by installing Apache:

dnf install -y httpd

Step 4: Configure clients

With your shiny new package mirror set up, you need to configure your client systems to use the mirror. Hop on your www01 system and…