David-Halliday.co.uk

apt proxy

If like me you run more than one Debian or Ubuntu box then you will soon realize how inefficient it is to update them all off the internet, in no time your connection will slow to a crawl and the updates will take a lifetime to get. This is where the apt-proxy application comes in handy. This tool is far simpler to configure than a full proxy such as squid and purpose built for this task.

Getting it is a case of:

apt-get install apt-proxy

Then for configuration there are only a few things you may wish to change. First I have a separate partition so that this does not interfere with anything else (not necessary but can be useful in some situations). In which case you need to alter the setting (make sure that the "aptproxy" user has full access to this location if you change it, a chown will do the trick):

cache_dir = /var/cache/apt-proxy

I personally uncomment the "max_age" setting so that the server doesn't delete files if they aren't used for a particular amount of time. Otherwise if you do a fresh install of a stable release (after 6 months) then you will have to re download everything again.

make sure you configure the Back end servers with your local/preferred servers

Client configuration

The client is easy to configure. In your sources.list just comment out the existing archive links and put in a link to your new server:

deb http://rockhopper:9999/debian etch main contrib non-free
powered by cmsimple.dk - powered by cmsimple-styles.com