Recipe 3.15. Selecting Package Mirrors for apt-proxy.conf

 < Day Day Up > 

3.15.1 Problem

The default package mirrors in apt-proxy.conf are all over the globe, how do you select which mirrors to use? Ideally, you'd like to use mirror sites that are close to you.

3.15.2 Solution

The default sources in /etc/apt-proxy/apt-proxy.conf look like this:

add_backend /debian/                                    \         $APT_PROXY_CACHE/debian/                        \         http://ftp.us.debian.org/debian/                \         http://ftp.de.debian.org/debian/                \         http://ftp.uk.debian.org/debian/                \         +ftp.us.debian.org::debian/

Visit http://www.debian.org/mirror/list for the current list of Debian mirrors. For example, here are some of the German mirrors on mirror/list:

DE Germany ---------- ftp.de.debian.org     /debian/            /debian/ ftp2.de.debian.org    /debian/            /debian/ ftp.tu-clausthal.de   /pub/linux/debian/  /pub/linux/debian/ debian.uni-essen.de   /debian/            /debian/ ...

Replace the defaults with your selections, prefixing each entry with http://:

add_backend /debian/                                    \         $APT_PROXY_CACHE/debian/                        \         http://ftp.de.debian.org/debian/                \         http://ftp2.de.debian.org/debian/               \         http://ftp.tu-clausthal.de/pub/linux/debian     \

The /etc/apt/sources.list files on the client machines do not need to be changed.

3.15.3 Discussion

You can use ping and traceroute to find out which mirrors have the fastest response times, because geographic proximity doesn't always mean faster responses.

Having three separate sources gives redundancy. apt-proxy queries them in order, so if the first one does not respond, it tries the next one.

3.15.4 See Also

  • apt-proxy(8), apt-proxy.conf(5), apt-proxy-import(8)

  • The official Debian mirrors list (http://www.debian.org/mirror/)

  • apt-proxy home page (http://apt-proxy.sourceforge.net/)

     < Day Day Up > 


    Linux Cookbook
    Linux Cookbook
    ISBN: 0596006403
    EAN: 2147483647
    Year: 2004
    Pages: 434

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net