Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
wiki:linux:yum_mirror_tutorial [2025/01/07 12:37] – removed - external edit (Unknown date) 127.0.0.1wiki:linux:yum_mirror_tutorial [2025/01/07 12:37] (current) – ↷ Links adapted because of a move operation Greg
Line 1: Line 1:
 +====== How To Create a Yum/Dnf Repository Mirror ======
  
 +Assumptions for this tutorial:
 +  * You have a server (''%%mirror01%%'') installed with Rocky Linux 9 that you'd like to host your local mirror on.
 +  * Said server also has a sizeable disk attached to it, mounted at ''%%/srv/repos%%''. 2TB should be the minimum disk size.
 +  * You have at least one system (''%%www01%%'')) that you want to use the mirror.
 +
 +===== 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 [[apache_web_server|https://www.apache.org]] to serve HTTP(S) clients.
 +
 +So get started by installing ''%%Apache%%'':
 +
 +<code>dnf install -y httpd</code>
 +
 +===== 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...