Assumptions for this tutorial:
mirror01
) installed with Rocky Linux 9 that you'd like to host your local mirror on./srv/repos
. 2TB should be the minimum disk size.www01
)) that you want to use the mirror.
Use reposync
and createrepo
to download and create the mirror.
Put above commands into a shell script so it's easily automatable. Bonus points for adding it to cron!
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
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…