Apt and Proxying

Posted by Andrew Denner on June 20, 2010 · 1 min read

I will write a bit more about my network setup, however here is a little trick I came on today…

My current downgrade from the Iowa State network is to a 1.5 mb Quest DSL line and having multiple Ubuntu linux computers in the house this decrease in speed hurts when it comes time to update.

I already have a Squid Proxy in place and after a bit of google work I found the package apt-proxy which serves as a local psudo repo.  When requests are received if the local repo doesn’t have the file then it will go out and pull the package from the real repository.  You can also configure how long local copies are stored.

To install all I had to do was type sudo apt-get install apt-proxy.  After a little of configureing (the Umin servers are closer then the default proxy for me)

Finally I had to edit each computer’s apt source list replacing the current server with the local server… thus

deb-src http://archive.ubuntu.com/ubuntu/ hardy main restricted
becomes
deb http://proxy.lan:9999/ubuntu/  hardy main restricted

for more info you can read up on it at The Community Ubuntu Documentation