Vizible’s Blog

Caching with apt-proxy

Posted in Tips by wearetherock on May 5, 2008

When you have to install package on multiple machine, there are many solution possible, I have one elegant method to do that by using apt-proxy, apt-proxy can caches the packages you download from the internet, then you can access the packages from other computers on your network, If not found specific package in the cache, apt-proxy automatically download and cashes it.

Today, I used this method with my computers, because in the lab I have many machine that can’t connected to outside world, I have only one machine that has 2 NIC, first NIC connected to outside and another connected to switch.

A few step to do that

Ubuntu Server 7.10
eth0 : (this interface can connected to outside world)
eth1 : (connected to switch)

Ubuntu Server 7.10
eth0 : – (all connected to the same switch)

1. Install apt-proxy on Server

sudo apt-get install apt-proxy

2. Edit apt-proxy configuration file in /etc/apt-proxy/apt-proxy-v2.conf
insert remote repositories into “backends” section, I inserted two line

backends =

do nothing any more

3. Initialize apt-proxy

sudo /etc/init.d/apt-proxy restart

1. Edit /etc/apt/source.list specific repository URL with references to server like this

deb gutsy main restricted multiverse universe

9999 : a default apt-proxy port
ubuntu : backend section that found in /etc/apt-proxy/apt-proxy-v2.conf on server

2. Update package list

sudo apt-get update

3. start installation

sudo apt-get install package_name


Tagged with:

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: