[WBEL-users] How Do I Set Up a Local Up2date Server?

Kirby C. Bohling kbohling@birddog.com
Tue, 14 Sep 2004 18:21:08 -0500


On Tue, Sep 14, 2004 at 02:19:40PM -0700, George Salt wrote:
> Greetings,
> 
> I've been running WBEL for a few weeks now.  I like
> it, and I'm planning to install it on a few more
> machines on my LAN.
> 
> Is it possible to download all of the update rpms to
> one machine, and then use that machine as the up2date
> server for the other machines on my LAN?  If someone
> could point me to an existing HowTo doc, that would be
> great.

If all you want to do is duplicate an existing yum repository, (as
opposed to creating a new one from scratch).

If you know how to setup apache and run rsync, it's trivial.

I use this as my shell script, pick one of the two mirrors by
uncommenting "RSYNC_BASE".

#!/bin/sh
#RSYNC_BASE="rsync://mirrors.esat.net/ftp/mirrors/whiteboxlinux.org/"
#RSYNC_BASE="rsync://mirror.physics.ncsu.edu/whitebox/"
versionList="3.0"

for ver in $versionList
do
        for subdir in os updates
        do
                echo "Fetching WhiteBox: /mirrors/whitebox/$ver/en/$subdir/"
                mkdir -p /mirrors/whitebox/$ver/en/$subdir/
                rsync -avr -P --delete $RSYNC_BASE/$ver/en/$subdir/.  /mirrors/whitebox/$ver/en/$subdir/.
        done
done

# EOF

That will duplicate the files to your local machine, in a path
looking like this:

/mirrors/whitebox/3.0/en/updates

Now, just setup Apache to allow access to that directory by doing
something like this in your config files:

<Directory "/mirrors">
    Options Indexes FollowSymLinks
    AllowOverride None
    Order allow,deny
    Allow from all
</Directory>

Alias /mirrors "/mirrors"


<Directory "/mirrors/whitebox">
    Options Indexes FollowSymLinks
    AllowOverride None
    Order allow,deny
    Allow from all
</Directory>


Just cron up the rsync script, and you should be good to go.  One of
the nice things about yum is that, it's very, very simple to mirror
an existing repository.  You can go ahead and create a new
repository using yum-arch, but I've never done that.

Now, "http://server.name/mirrors/whitebox" should serve up pages.
Once that's working, go change the baseurl lines in /etc/yum.conf to
point at the existing server, and you're done.

If you need more detail instructions, just ask, but that's the 5
minute version of how I did it.

	Thanks,
		Kirby