Sharing apt cache across multiple machines

David Clarke gadicath at yahoo.com
Fri Nov 23 19:45:57 EST 2001


On Fri, 23 Nov 2001, James Macnicol wrote:
> Hello,
> 
> to date is a hassle.  Since all the downloaded .deb files are kept in
> /var/cache/apt/archive (or whatever it's called) I would like to use
> this to update my desktop box when it is connected to my laptop via
> Ethernet.  Has anyone seen a definitive set of instructions on how to
> 

One way would be to use a httpd on your laptop, it need not run all the
time, just manually start it when you want to get debs off it.

Make it so that the /var/cache/apt/archives dir is able to be accessed
through the httpd.  Probably a nice idea to use an alias, in squid, that
would be something like "Alias /debs/ /var/cache/apt/archives/".

Then add a line to the desktop's sources.list of "deb
http://ip-of-laptop/debs/ ./".

There are two other things you'll have to do, make a Packages, and a
Packages.gz in the directory.  To do this go into the directory and run
something along the lines of "dpkg-scanpackages . Packages >
Packages;gzip -c Packages > Packages.gz".

Then just run apt-get update on the desktop when the laptop is connected
and when the httpd is running.  You should be able to install from the
laptop over http once that's done.

	HTH,
		David.

-- 
Don't tell me I'm burning the candle at both ends -- tell me where to
get more wax!!
-
David Clarke <gadicath at yahoo.com> | David Clarke <s3353950>
Key Fingerprint :  869B 53DD 5E80 E1F0 93F6  9871 0508 0296 5957 F723




More information about the linux mailing list