Creating A Local Yum Repository on CentOS 5.x

centosReducing the costs of I.T without reducing the functionally of your systems is one of the major obstacles to overcome. One of these costs is bandwidth, especially in South Africa.

One of the first bandwidth saving tips any organization should know is the importance of creating a local YUM repository on your LAN. Not only do you decrease the time it takes to download and install updates, you also decrease bandwidth usage. This saving will definitely please the suites of any organization.

This How To show’s you a simple yet effective way of setting up your local YUM server and client.

TIP: Distribute your YUM configuration via your Puppet Master

Preliminary Note:

We are using two empty CentOS 5.2 servers in this tutorial:

* (IP YUM Repo server
* (IP YUM client

Configure YUM repo server as follows:

Create the following Directories:

Create a bash script that will rsync your local YUM Repo server with your local YUM mirror (Internet Solutions –
CentOS Mirror list –

Add the bash script to your crontab to update your local repository every night (01H00 in this case)

Configure YUM client servers as follows:

Rename all existing yum repositories from *.repo to *.old

Test your setup by running a yum update on your client machine.