An alternative to http-replicator

Walter Dnes waltdnes-SLHPyeZ9y/tg9hUCZPvPmw at public.gmane.org
Fri Jun 9 04:55:48 UTC 2006


  We want to be "kinder and gentler" to the Gentoo mirrors.  I have 2
machines; my main machine and a 1999 450 mhz PIII as "hot backup".  I
try to keep the backup up to date with apps duplicating the main
machine, so that if the main machine dies, I can restore some data from
backups and be running in a couple of hours.

  The procedure for "emerge --rsync" using the main machine as server is
simple.  I'll now present my solution for /usr/portage/distfiles.  This
obviously works best for machines with a similar set of apps.  Run
emerge update on the server machine first.  It'll get the tarballs it
needs, and they'll be sitting in /usr/portage/distfiles, waiting to be
served out to other machines in your LAN that need the same tarballs.

  I use the "boa" webserver.  It's lighweight, simple to configure, and
you can run multiple instances simultaneously.  That is the best way to
separate privileges for different clients.

  *IMPORTANT*  Gentoo's emerge command always looks in the "distfiles"
folder below whatever URL it's given for a mirror.  E.g. if I specify
"http://www.bad.example.com" as the mirror to use, emerge will look in
"http://www.bad.example.com/distfiles".  The "Alias" declaration in
boa.conf handles this.  The secondary machine's /etc/make.conf has the
line...

GENTOO_MIRRORS="http://192.168.123.252:1024 ftp://ftp.ndlug.nd.edu/pub/gentoo/
+http://mirror.datapipe.net/gentoo"

so it'll try my main machine (192.168.123.252 on port 1024) first.  I
invoke the portage server dedicated boa with the command...
boa -c /root/.boa/portage/
which implies that the config file to use is /root/.boa/portage/boa.conf

My /root/.boa/portage/boa.conf currently looks like so...

Port 1024
Listen 192.168.123.252
User nobody
Group nogroup
ErrorLog /var/log/boa/portage/error_log
AccessLog /var/log/boa/portage/access_log
DocumentRoot /usr/portage/distfiles/
UseLocaltime
DirectoryMaker /usr/lib/boa/boa_indexer
KeepAliveMax 1000
KeepAliveTimeout 10
MimeTypes /etc/boa/mime.types
DefaultType text/plain
Alias /distfiles /usr/portage/distfiles

  Note that in addition to using a dedicated I/O port, the "portage
instance" of boa also has its own log files.

-- 
Walter Dnes <waltdnes-SLHPyeZ9y/tg9hUCZPvPmw at public.gmane.org> In linux /sbin/init is Job #1
My musings on technology and security at http://tech_sec.blog.ca
--
The Toronto Linux Users Group.      Meetings: http://tlug.ss.org
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://tlug.ss.org/subscribe.shtml





More information about the Legacy mailing list