Faster Updates and Installs with Debian Approx Server
More than one Debian box? (Should work for Ubuntu, also.) Upgrade and install faster with approx. From the package, itself:
Approx is an HTTP-based Debian archive server. It fetches packages from remote repositories on demand, and caches them for local use.
Approx saves time and network bandwidth if you need to install or upgrade Debian software for a number of machines on a local network. Each package is downloaded from a remote site only once, regardless of how many local clients install it. The approx cache typically requires a few gigabytes of disk space.
Approx also simplifies the administration of client machines: repository locations need only be changed in approx's configuration file, not in every client's /etc/apt/sources.list file.
Setting it up is easy:
1. As root, type the following on the command line: apt-get install approx. Or use synaptic, or aptitude, or whatever apt interface you are most familiar with.
2. Edit /etc/approx/approx.conf. Mine is as follows:
interval 120
max_wait 10
#debug true # log debug info to /var/log/syslog
debian http://http.us.debian.org/debian
security http://security.debian.org/debian-security
non-us http://debian.teleglobe.net/non-US
wine http://wine.sourceforge.net/apt
java ftp://ftp.tux.org/java/debian
beryl http://debian.beryl-project.org
3. Edit /etc/apt/sources.list. Mine follows. Note that I have--in my /etc/hosts file--set deb-proxy to the ip address of the approx machine. In this specific case, 127.0.0.1. Don't forget the port (9999)!
#stable
#deb http://deb-proxy:9999/debian stable main non-free contrib
#deb-src http://deb-proxy:9999/debian etch main non-free contrib
#deb http://deb-proxy:9999/security stable/updates main non-free contrib
# deb-src http://deb-proxy:9999/security etch/updates main contrib non-free
# etch
deb http://deb-proxy:9999/debian etch main non-free contrib
#deb-src http://deb-proxy:9999/debian etch main non-free contrib
deb http://deb-proxy:9999/security etch/updates main non-free contrib
# deb-src http://deb-proxy:9999/security etch/updates main contrib non-free
# wine
#deb http://deb-proxy:9999/wine binary/
#java
#deb http://deb-proxy:9999/java etch non-free
#sid
deb http://deb-proxy:9999/debian sid main non-free contrib
#experimental
deb http://deb-proxy:9999/debian experimental main non-free contrib
#beryl
deb http://deb-proxy:9999/beryl etch main
4. Restart the approx server: /etc/init.d/approx restart.
5. From the client machine, apt-get update. At first, things won't look like they work, but be patient... The proxy will continue to get the files, even if apt times you out... Just run apt-get again. If things really aren't working, enable the debug option on the server, and tail syslog.
This makes upgrading multiple machines a breeze and multiple installs fairly fly, after the first one!
SB
Comments
SB