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

Re: very limited mirror needed



On Wednesday 21 July 2004 15:37, Steve Glines wrote:
> I am building an install lab (i386) that is intended to mimic a full
> network install. I'd like to mirror just enough to give a student the
> experience of having installed Debian without mirroring everything.
>
> The lab has to be disconnected from the Internet except for periodic
> upgrades. Can anyone help me? I don't have room for a full mirror.

apt-cacher suits the bill perfectly.

debian:~# apt-cache show apt-cacher
Package: apt-cacher
Priority: optional
Section: net
Installed-Size: 192
Maintainer: Jonathan Oxer <jon@debian.org>
Architecture: all
Version: 0.7-2
Depends: perl (>= 5.6.0-16), wget, apache | apache-ssl | apache2, bzip2
Filename: pool/main/a/apt-cacher/apt-cacher_0.7-2_all.deb
Size: 27570
MD5sum: bc490a3f159955f2f8fb42404dd80f16
Description: Caching system for .deb packages
 Apt-cacher performs caching of .deb packages which
 have been downloaded by local users. When a package
 is requested, the cache checks whether it already
 has the latest version, in which case it sends the
 package to the user immediately. If not, it
 downloads the package while streaming it to the user
 at the same time. A local copy is then kept for use
 by other users.

Thus, you'll only download the installation files once, and then 
everyone else can use the locally mirrored .debs for subsequent 
installations. Nothing extra than what you need will be downloaded!

And: (from the apt-cacher man page)
THE MOST FAQ IN HISTORY:
Q: Can I just copy some .debs into the cache dir and have it work?
A: Yes! No! Almost!

Apt-cacher stores debs in the cache dir with the HTTP headers prepended 
and relies on them when sending to clients. It also uses a little flag 
file to keep track of  which packages are completely downloaded. If you 
copy .debs straight in and don't fix those things up, fetching them 
*will* fail.

However, Apt-cacher now comes with an import helper script  to  make  
things  easier. Just  put  a  bunch of .debs 
into /var/cache/apt-cacher/import (or a directory called 'import' 
inside whatever you've set your cache dir to  be,  and 
run  /usr/share/apt-cacher/apt-cacher-import.pl.  The  script  will run 
through all the .debs it finds in that dir and set them up for you in 
the cache.

Good luck

-A



Reply to: