[CentOS] Starting a Local CentOS Mirror
jpyeron at pdinc.us
Thu Jun 26 22:09:26 UTC 2008
> -----Original Message-----
> From: centos-bounces at centos.org
> [mailto:centos-bounces at centos.org] On Behalf Of Art Age Software
> Sent: Thursday, June 26, 2008 6:03 PM
> To: centos at centos.org
> Subject: [CentOS] Starting a Local CentOS Mirror
> Hi all,
> I would like to set up a local CentOS mirror, as suggested by
> others on this list, to cut down on bandwidth usage, etc. I
> have read a couple HowTos and it seems pretty
> straight-forward, but I do have some questions.
> 1) How should I change my entries in /etc/yum.repos.d?
> Specifically, should I replace CentOS-Base.repo with my own
> .repo file?
I don't like fidling with files that are provided by rpms, so we use a local DNS
override on the mirrors.centos.org, et al
Then we provide yum & up2date with the mirror list to choose from (1 entry our
> 2) Is there a way to configure yum to prefer the local repo,
> but use an external mirror if the local is not available?
See above and update your returned list based on prefences.
> 3) What is the best practice around keeping the local repo
> updated? A once-a-day cron job to rsync from an external
Every ~17 hours I think we do it. We also use locks to prevent more than one
from running at a time. If it fails it will try again, and delay 2x and try
> If this is the correct approach, is there a way to
> rsync from a "mirror list" so that updates won't fail if a
> particular mirror happens to be unavailable when the cron job runs?
Hmm, don't know, might be a good idea.
> Thanks in advance for any guidance you can provide. I want to
> be sure I get this right!
Will attach our script in reply to this message
- Jason Pyeron PD Inc. http://www.pdinc.us -
- Principal Consultant 10 West 24th Street #100 -
- +1 (443) 269-1555 x333 Baltimore, Maryland 21218 -
This message is for the designated recipient only and may contain
privileged, proprietary, or otherwise private information. If you
have received it in error, purge the message from your system and
notify the sender immediately. Any other use of the email by you
More information about the CentOS