View previous topic :: View next topic |
Author |
Message |
eccentric
Site Admin

Posts: 72
Joined: 08 Jan 2003
Location: Kingston, ON
|
Posted: Mon Nov 24, 2003 11:31 am Post subject: apt-cacher |
 |
|
For those of you out there with multiple debian boxes on a single internet connection, you may be interested in this.
What the program does is cache apt-get requests on a machine so that you don't have to download the same packages over and over. For instance, if your doing an upgrade on 5 machines the first upgrade will download the packages from your source on the internet. Then next upgrade will do the same thing but find the packages locally and so it won't need to download from the net again. This saves you bandwidth and time (as well as taking some load off the debian mirrors).
apt-cacher runs through apache so if you have a gateway with apache installed your already on your way. Here is a super quick setup guide.
apt-get install apt-cacher
/etc/init.d/apache restart
Then edit the sources on all your machines and modify the deb lines like so.
deb http://ftp.us.debian.org/debian stable main non-free contrib
changes to
deb http://<your apt-cache machine>/apt-cacher/ftp.us.debian.org/debian stable main non-free contrib
Where <your apt-cache machine> is the hostname or ip of your machine that you installed apt-cacher on.
You may also want to edit the /etc/apt-cacher/apt-cacher.conf file and turn on reporting which is kind of interesting. Change the line generate_reports=0 to a 1 and it will generate reports which you can view at http://<your apt-cache machine>/apt-cacher/report
And there is also a great guide over a linmagau.org (that site is really great) on the whole apt caching subject and details on how to setup apt-cacher as well.
http://articles.linmagau.org/modules.php?op=modload&name=Sections&file=index&req=viewarticle&artid=451&page=1 |
|
Back to top |
|
 |
hurt
Site Admin

Posts: 80
Joined: 08 Jan 2003
Location: kingston
|
Posted: Thu Jul 22, 2004 5:01 pm Post subject: |
 |
|
what kinda space do you see this taking up with most installs of a few workstations? like is there anyway to know the total size of a complete debian mirror?
_________________
.<insertasubliminalmessagehere> |
|
Back to top |
|
 |
eccentric
Site Admin

Posts: 72
Joined: 08 Jan 2003
Location: Kingston, ON
|
Posted: Thu Jul 22, 2004 7:30 pm Post subject: apt-cacher good |
 |
|
Well the good thing about apt-cache is that it doesn't mirror. Thus the space it takes up is pretty minimal (currently 700 megs of hard drive space on my apt-cache server for 4 systems running sid).
Being a cache it only downloads the package when it's requested. After that it stores a copy of the cached package on the system for a set amount of time (2 weeks in my case). So like a web cache it is normal speed the first download, and then every other download goes directly from the server without having to go out on the net to download it.
It makes sense to run on just about any place you have more than two debian boxes that are downloading similar packages (espcially if it's sid). And it does some basic reporting too 
http://slavery.cx/apt-cacher/report
So over the last six months I have updated 20 gigs worth of debian packages, but only actually downloaded from the internet 10 gigs. |
|
Back to top |
|
 |
hurt
Site Admin

Posts: 80
Joined: 08 Jan 2003
Location: kingston
|
Posted: Thu Jul 22, 2004 10:48 pm Post subject: |
 |
|
looks like to can save some bandwidth in the long run for you pretty easy.
_________________
.<insertasubliminalmessagehere> |
|
Back to top |
|
 |
|