Keeping many Debian servers up to date with apt-proxy
Posted by kgfullerton on Mon 23 Jan 2006 at 14:10
Maybe, like me, you've got more than one Debian box on your network - either at home or at work and you want to keep them up to date with apt but are on a slow link or metered bandwidth? If so, apt-proxy could be the answer for you.
apt-proxy is a Python based daemon that caches all apt requests that go through it, and stores a copy of the files locally, so you only need to download a copy of the .deb via apt once.
Installation is simple - just run
apt-get install apt-proxyon the machine you want as your proxy server. After installation is complete you'll have a daemon listening on port 9999.
Packages downloaded are stored in /var/cache/apt-proxy by default, but this and many other options, including the servers to use to download from, can be changed in the config file /etc/apt-proxy/apt-proxy-v2.conf - you can change the port and the interface that apt-proxy listens on.
The only change left is to change your /etc/apt/sources.list on all Debian machines and change them to look at http://$APT_PROXY_MACHINE:9999/debian.
Now, the next apt-get update and apt-get upgrade should be fast for the rest of the machines on your network.