[CentOS] Using a local mirror? [SOLVED]

Wed Nov 28 05:19:15 UTC 2007
Jason Pyeron <jpyeron at pdinc.us>

> -----Original Message-----
> From: centos-bounces at centos.org 
> [mailto:centos-bounces at centos.org] On Behalf Of Jay Leafey
> Sent: Tuesday, November 27, 2007 23:21
> To: CentOS mailing list
> Subject: Re: [CentOS] Using a local mirror? [SOLVED]
> 
> 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 

Right now I am using the hosts file too.

In our server farm we are expected to make as few deviations from baseline
as possible, that is why the dns redirection.

> 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.

We might want to act as a gatekeeper on the mirror too, again for CM sake.

> 
> 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.

The list might like it anyway.


> 
> -- 
> Jay Leafey - Memphis, TN
> jay.leafey at mindless.com
> 

Thanks

-jason

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
-                                                               -
- Jason Pyeron                      PD Inc. http://www.pdinc.us -
- Sr. 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
is prohibited.