[ubuntu-za] Local Repository Question

Stefano Rivera ubuntu-za at rivera.za.net
Fri Jun 25 10:16:29 BST 2010


Hi Raymond (2010.06.25_10:54:18_+0200)
> (there is also an apt-cacher but ng is better IMO)

Agreed.

Advantages of a mirror over apt-cacher-ng:
1. first person to download something gets it fast.

Advantages of apt-cacher-ng:
1. Works with PPAs, etc automattically. Anything a user tries to access
   through it will be cached.
2. More space efficient. It only has the packages people use on it.

> To use all you need to do is change the line in the .list file from:
> deb http://ppa.launchpad.net/chromium-daily/beta/ubuntu lucid main
> to:
> deb http://10.0.0.100:3142/ppa.launchpad.net/chromium-daily/beta/ubuntu
> lucid main

Alternatively, you can leave all your machines' sources.list files as
they are (but it's preferable that they all use the same Ubuntu mirror,
say, za.archive.ubuntu.com).

Then you create a file called, say, /etc/apt/apt.conf.d/apt-proxy with
the following contents:
Acquire::http::Proxy "http://my-proxies-host-name:3142/";

> I also sometimes update my laptop from work so I wrote two scripts to
> convert all my .list files to use or not use the cache,

The advantage of the proxy approach above is that to enable / disable
it, you just need to comment out that line (using a "//")

In some situations you may also need to
rm /var/lib/apt/lists/*

SR

-- 
Stefano Rivera
  http://tumbleweed.org.za/
  H: +27 21 465 6908 C: +27 72 419 8559  UCT: x3127



More information about the ubuntu-za mailing list