[CentOS] Using a local mirror? [SOLVED]

Wed Nov 28 04:21:29 UTC 2007
Jay Leafey <jay.leafey at mindless.com>

This is a bit late, I know, but I found a similar setup described at:

http://www.gurulabs.com/goodies/YUM_automatic_local_mirror.php

Their server appears to be down right now, but that's where I found the 
information.  The original was designed for Fedora, but it was adapted 
to CentOS pretty easily.  I've been using this for about 4 months now 
with great results.

Rather than spoofing the mirrorlist.centos.org entry in DNS, I just have 
anybody that wants to use the local mirror put an entry in their 
/etc/hosts file pointing to the IP address of the local server.  The 
Perl CGI script adds the entry for our local server to the results 
returned from the real mirror list and depends on yum-fastestmirror to 
pick the local server from the list.

Since we don't mirror all architectures on our local server, I added 
some intelligence to the Perl script so that it would only add the local 
server if the requested repository, release, and architecture were on 
the local server.  If anybody wants to see the final results, just let 
me know and I'll post my modified script and the Apache config fragment 
or a pointer to it.

-- 
Jay Leafey - Memphis, TN
jay.leafey at mindless.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 5177 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://lists.centos.org/pipermail/centos/attachments/20071127/32e5bd17/attachment-0004.bin>