apt.cipar.net (192.168.1.12)
A local apt cache for the desktop and server installations and security updates, combine the debian, ubuntu, the medibuntu and a custom repo.
installation
newvserver --vsroot /VSERVERS --hostname apt --domain cipar.net --ip 192.168.1.12/24 --dist etch --mirror http://ftp.nl.debian.org/debian/ --interface dummy0
# nano /etc/shorewall/rules
Add the following line
HTTP/ACCEPT dmz:192.168.1.12 net DNS/ACCEPT dmz:192.168.1.12 net
# /etc/init.d/shorewall restart
vserver apt start vserver apt enter passwd
Then enter the passwd RED-ENVELOPE
apt-cacher
http://manpages.songshu.org/manpages/lenny/en/man1/apt-cacher.1.html
# apt-get install apache2
# nano /etc/apache2/httpd.conf
And we make sure that apache binds to its IP address by adding this line
Listen 192.168.1.12:8080
# /etc/init.d/apache2 restart
# apt-get install apt-cacher
# nano /etc/apt-cacher/apt-cacher.conf
# optional setting, binds the listening daemon to one specified IP. Use IP # ranges for more advanced configuration, see below. daemon_addr=192.168.1.12
# nano /etc/default/apt-cacher
and set
AUTOSTART=1
/etc/init.d/apt-cacher start
All that is left to do now is to edit the sources on every machine
# nano /etc/apt/sources.list
and change it to look like this
deb http://192.168.1.12:3142/security.debian.org/ etch/updates main contrib deb http://192.168.1.12:3142/ftp.nl.debian.org/debian/ etch main contrib non-free deb http://192.168.1.12:3142/www.backports.org/debian etch-backports main contrib non-free
So when setting up new Vservers we use –mirror http://192.168.1.12:3142/debian.apt-get.eu/debian
For the ubuntu desktops we change it to this
deb http://192.168.1.12:3142/archive.ubuntu.com/ubuntu/ gutsy main restricted universe multiverse deb http://192.168.1.12:3142/security.ubuntu.com/ubuntu gutsy-security main restricted universe deb-src http://192.168.1.12:3142/security.ubuntu.com/ubuntu gutsy-security main restricted universe deb http://192.168.1.12:3142/archive.ubuntu.com/ubuntu/ gutsy-updates main restricted universe multiverse deb http://192.168.1.12:3142/packages.medibuntu.org/ gutsy free non-free