If you have a few number Debian or Ubuntu machines, you may want to save some bandwidth and speed up package installations. This can be achieved with the help of approx
, which is an HTTP-based proxy server for Debian-style package archives. This tutorial is based on Debian 8 (jessie).
Firstly, install the approx package
apt-get install approx
After installation, you need to edit the configuration file of approx that is /etc/approx/approx.conf
. My configuration is like this:
debian http://ftp.tr.debian.org/debian/ security http://security.debian.org/
Change the debian mirror to your favorite mirror. List of Debian mirrors
There are some parameters for approx which can be seen with man 5 approx.conf
command. I did not change any parameter but you may need it.
I use approx for my custom debian builds with Simple-CDD so I don't need to change my /etc/apt/sources.list
file.
If you need, change your sources.list
file like this to forward the apt requests to approx.
deb http://127.0.0.1:9999/debian jessie main contrib non-free deb http://127.0.0.1:9999/security jessie/updates main contrib non-free deb-src http://127.0.0.1:9999/debian jessie main contrib non-free
You will save bandwidth and time. Enjoy.
Discussion