[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: apt-cacher



On Wed, 8 Jun 2005 20:53:56 -0400
"Roberto C. Sanchez" <roberto@familiasanchez.net> wrote:

> On Wed, Jun 08, 2005 at 04:57:06PM -0500, Jacob S wrote:
> > On Wed, 8 Jun 2005 17:37:33 -0400
> > 
> > Apt-cacher serves the same purpose as apt-proxy and works just as
> > well, in my experience. I switched to it before apt-proxy v2 hit
> > Sarge and found it to be better than apt-proxy v1 and it would start
> > streaming the file faster (helping to avoid timeouts that I had
> > problems with in apt-proxy).
> > 
> > Since you stated that apt-proxy is better, do you have some evidence
> > or a reason for your statement, or is it just preference?
> 
> Both.  apt-proxy lets me specify the following things that I could not
> find a way to specify for apt-cacher:

Thanks. I can not speak for others, but I at least find it much more
enlightening and beneficial when people take the time to share their
reasons instead of simply stating something as fact. This is Debian,
where everything is all about choice. :-) 

> 1. max size of the local archive
> 2. max number of versions of each package to keep per distro (e.g., 2
> means the two most recent from stable, testing and unstable for a
> total of six)
> 3. how often to sweep the archive for obselete packages
> 4. how to allow connections via ftp and rsync
> 5. max age of packages in local archive

With the exception of #4, I have not had reason to try any of those
advanced features. Number 4 I simply found repositories that would let
me access them via http (including Christian Marillat's excellent
repository).

> apt-proxy also caches the the Packages.gz files from the mirrors in
> addition to the packages themselves.  This saves quite a bit as for
> Sarge they are ~5 MB each.  

If apt-cacher does not do this, don't tell my installation that. :-) 
"ls -l apt-cacher/packages/" returns about 46 Packages.gz files that
take a total of about 9.9MB. My update speeds seem to reflect this as
well.

> apt-cacher also requires you to do some funny things with IP addresses
> to restrict who can access it since it runs over apache.  apt-proxy
> runs on its own port (default 9999) so you can filter requests at the
> hosts.{allow,deny} and iptables levels.  Much more secure, IMHO, if
> your machine faces the net.

What is so 'funny' or insecure about this[1]? I can agree that it might
not be as secure as iptables, but it is still very secure. Try hitting
http://apt.6texans.net/apt-cacher/ if you like. And of course it's not
hard to install it on an inside machine that is not accessible from the
net. Personally, I like having the functionality without having to
install yet-another-daemon and consider it to take fewer resources as
far as cpu time and memory are concerned.

[1]cat /etc/apt-cacher/apache.conf

Alias /apt-cacher /usr/share/apt-cacher/apt-cacher.pl

<DirectoryMatch /usr/share/apt-cacher/>
        Options ExecCGI
        AddHandler cgi-script .pl
        AllowOverride None
        order deny,allow
        allow from 192.168.0.0/255.255.255.0
127.0.0.1/255.255.255.0 
</DirectoryMatch>

Just my $0.02.

Jacob



Reply to: