apt-proxy on Ubuntu 6.06
Tim Frost
timfrost at xtra.co.nz
Tue Oct 24 05:40:38 UTC 2006
On Mon, 2006-10-23 at 15:42 +0200, Bjørn Ingmar Berg wrote:
> Hi
>
> apt-ptoxy has been recommended several times when posters have wanted
> to set up a local partial mirror. After reading about it it sounds
> like a promising solution. It gets difficult after installing it via
> Synaptic, as apt-proxy doesn't do anything "out of the box".
>
> I have googled for howtos but not had much success finding anything useful.
> Hopefully someone here on the list can help a little.
>
> * How do I get apt-proxy to start running as a daemon at the same time
> as the machine I've installed it on boots? (As far as I can
> understand apt-proxy's home-page this should be possible.)
It should start automatically. Certainly for me it does. I have the
following links in the /etc/rc*.d directories. Note that I installed
apt-proxy while running breezy, and it was upgraded when I migrated to
dapper):
tim at marvin:~$ ls -l /etc/rc*.d/*apt-proxy
lrwxrwxrwx 1 root root 19 2005-12-12 22:18 /etc/rc0.d/K20apt-proxy
-> ../init.d/apt-proxy
lrwxrwxrwx 1 root root 19 2005-12-12 22:18 /etc/rc1.d/K20apt-proxy
-> ../init.d/apt-proxy
lrwxrwxrwx 1 root root 19 2005-12-12 22:18 /etc/rc2.d/S20apt-proxy
-> ../init.d/apt-proxy
lrwxrwxrwx 1 root root 19 2005-12-12 22:18 /etc/rc3.d/S20apt-proxy
-> ../init.d/apt-proxy
lrwxrwxrwx 1 root root 19 2005-12-12 22:18 /etc/rc4.d/S20apt-proxy
-> ../init.d/apt-proxy
lrwxrwxrwx 1 root root 19 2005-12-12 22:18 /etc/rc5.d/S20apt-proxy
-> ../init.d/apt-proxy
lrwxrwxrwx 1 root root 19 2005-12-12 22:18 /etc/rc6.d/K20apt-proxy
-> ../init.d/apt-proxy
If those symlinks don't already exist, they can be created. Make sure
that the start/stop script exists in /etc/init.d.
>
> * Editing /etc/apt-proxy/apt-proxy-v2.conf
> I set "Server IP to listen on" to the machines own IP. When trying to
> run apt-proxy I get the message
> "twisted.internet.error.CannotListenError: Couldn't listen on
> any:9999: (98, 'Address already in use')." What have I misunderstood?
You should not need to change this from the default.
>
> * Editing /etc/apt-proxy/apt-proxy-v2.conf
> There are many entries in the file pointing to various debian
> backends. As there are only Ubuntu machines on this LAN I assume they
> can all be removed. Correct?
> Also I assume I should add backend entries for things like Seveas'
> mirror. I guess that would make a line like "backends =
> http://mirror.ubuntulinux.nl/dapper-seveas" Any chance this will
> work, or should I do it differently?
Since all the machines you are working with are ubuntu, then yes, you
can delete all the commented-out debian repositories.
You need a complete entry for each repository. For instance, I have the
following for Seveas:
[ubuntu-seveas]
;; Dennis Kaarsemakers repository - mirror
backends = http://mirror2.ubuntulinux.nl/
The tag '[ubuntu-seveas]' labels the entry, and must be unique within
the apt-proxy configuration. The name is used in the sources.list entry
for each PC that you set up to use apt-proxy.
>
> * Changing sources.list on the clients
> As far as I can understand all machines that want to use the proxy
> must change their sources list. Is this simply repacing the URL to
> point to the machine running apt-proxy, leaving the rest as it is?
> (For every entry in sources.list of course.)
You need to reference the entry that you added to apt-proxy-v2.conf.
So, for Seveas' repository, I have the following entry, on a machine
running edgy (marvin is the host running apt-proxy, and has been added
to /etc/hosts):
deb http://marvin:9999/ubuntu-seveas edgy-seveas all
>
>
> Thanks in advance!
>
> Regards,
> Bjørn Ingmar Berg
Tim
More information about the ubuntu-users
mailing list