apt-cacher - fast upgrades on a network of computers
I am writing up a short 'executive' summary about how to setup apt-cacher-ng to accelerate upgrades by caching packages locally. The title of this post links to the full story where I got all of this information. This should work on any apt/deb based system. This post has been updated to use apt-cacher-ng. Some of the steps may be a bit different.
I am publishing this mostly for my own use. But feel free to make use of this information as well. My settings are a bit different from the example.
To install:
sudo apt-get install apt-cacher-ng
Edit /etc/apt-cacher/apt-cacher.conf and add:
allowed_hosts=192.168.1.0/24
allowed_hosts_6=
expire_hours=12
Edit /etc/default/apt-cacher
AUTOSTART=1
Finally import your debs:
sudo /usr/share/apt-cacher/apt-cacher-import.pl /var/cache/apt/archives
sudo /etc/init.d/apt-cacher restart
sudo cp /etc/apt/sources.list /etc/apt/sources.list.XXX
sudo nano /etc/apt/sources.list
deb http://[servername]:3142/archive.ubuntu.com/ubuntu/ hardy main restricted universe multiverse
Check that it is installed correctly: http://localhost:3142/
(assuming localhost is setup correctly in /etc/hosts)
EDIT: There is a new version apt-cacher-ng. It works the same way as apt-cacher, but is more resource efficient and has fewer bugs.
I am publishing this mostly for my own use. But feel free to make use of this information as well. My settings are a bit different from the example.
To install:
sudo apt-get install apt-cacher-ng
Edit /etc/apt-cacher/apt-cacher.conf and add:
allowed_hosts=192.168.1.0/24
allowed_hosts_6=
expire_hours=12
Edit /etc/default/apt-cacher
AUTOSTART=1
Finally import your debs:
sudo /usr/share/apt-cacher/apt-cacher-import.pl /var/cache/apt/archives
sudo /etc/init.d/apt-cacher restart
sudo cp /etc/apt/sources.list /etc/apt/sources.list.XXX
sudo nano /etc/apt/sources.list
deb http://[servername]:3142/archive.ubuntu.com/ubuntu/ hardy main restricted universe multiverse
Check that it is installed correctly: http://localhost:3142/
(assuming localhost is setup correctly in /etc/hosts)
EDIT: There is a new version apt-cacher-ng. It works the same way as apt-cacher, but is more resource efficient and has fewer bugs.
0 Comments:
Post a Comment
<< Home