Logicalwebhost Cheatsheet

Linux & Open Source Cheatsheets & Howto's

Skip to: Content | Sidebar | Footer

Approx howto

Debian/Ubuntu/Mint have a package cache that can speed up subsequent installs/updates, it basically pulls the packages to your local network on one box, and then the others get it from that box running approx, which drastically speeds up network performance if you have multiple boxes. There are other ways to do this, this is one way:

Set up approx

You’d think it’d be hard, but it’s not really, the package does all the work, and you just point your other boxes to the proxy, which we set up like (on the SERVER, which uses the IP of 192.168.1.99, CHANGE THIS, YOURS WILL BE A DIFFERENT IP):

apt-get install approx
vi /etc/approx/approx.conf (change these two lines to reflect your upstream mirror, and add more if you need different systems to update)
  debian          http://debian.osuosl.org/debian
  security        http://security.debian.org/
service networking restart

now we set up your client (laptop, or server that wants to use the proxy). The first time you run apt-get update it will be slow, as it populates the upstream cache, but after that it will be MUCH faster for all your boxes to do updates.

cp /etc/apt/sources.list /etc/apt/sources.list.orig
vi /etc/apt/sources.list
  deb http://192.168.1.99:9999/debian/ wheezy main contrib non-free
  deb-src http://192.168.1.99:9999/debian/ wheezy main contrib non-free
  deb http://192.168.1.99:9999/security/ wheezy/updates main contrib non-free
  deb-src http://192.168.1.99:9999/security/ wheezy/updates main contrib non-free
apt-get update

If you run Squeeze, just change the wheezy instances in /etc/apt/sources.list to squeeze instead.

Write a comment

You need to login to post comments!