apt-cacher-ng - chache deb packages and sources.
To this date installing apt-cacher-ng is the most simple way to setup apt proxy in ubuntu.
Install apt-cacher-ng
sudo apt-get -y install apt-cacher-ng
Lets call the system which has apt-cacher-ng as server and other systems that are going to use this cache as client.
After installing the apt-cacher-ng on the server you have to make sure server it self uses this apt-proxy. You can do this by creating a file called /etc/apt/apt.conf.d/01proxy and enter following line and save the file.
Acquire::http { Proxy "http://127.0.0.1:3142"; };
Now open terminal in client systems and create the same /etc/apt/apt.conf.d/01proxy file and enter the following code and save the file.
Acquire::http { Proxy "http://<server ip address>:3142"; };
Replace "< server ip address >" with real server ip address.
That's it all your apt fetch and updates will go through your apt proxy and you will save tons of bandwidth if you have multiple systems at work or home.
Comments