The FreeBSD Diary

The FreeBSD Diary (TM)

Providing practical examples since 1998

If you buy from Amazon USA, please support us by using this link.
[ HOME | TOPICS | INDEX | WEB RESOURCES | BOOKS | CONTRIBUTE | SEARCH | FEEDBACK | FAQ | FORUMS ]
Setting up a FreeBSD mirror site 3 February 1999
Need more help on this topic? Click here
This article has no comments
Show me similar articles
In a sudden rush of blood to my head, I decided that I could and would start a mirror site for FreeBSD.  The closest mirrors are in Australia.  And I think we have a fair number of sites in New Zealand.

So I installed the port.

NOTE: a few months after this article, I reinstalled cvsupd and you should use that article instead.  Well, perhaps in addition.  I'm not actually sure.

A word of caution
A mirror site is not something everyone should install.  I am providing this information only because I can and I certainly don't expect very many people to install a mirror site.
Installation
And since I have the entire ports tree installed, all I needed to do was:
# cd /usr/ports/net/cvsup-mirror/
# make
# make install

After that, the cvsupd was running.  This was quite painless.

cvsupd configuration
The configuration files were installed to /usr/local/etc/cvsup.  I modified config.sh to specify my upstream hosts (i.e. the sites from which I was going to mirror).

I also modified /etc/crontab so my cvsup job ran every 6 hours.   For details on that see man 5 crontab.  By default, this was run every 33 minutes.

/usr/local/etc/rc.d/cvsupd.sh was created during the install process.   If you run this file, it will start cvsupd if for some reason you killed it.   Remember to include the full path name when doing this, otherwise you will get the following error:

[root@ns:/usr/local/etc/rc.d] # ./cvsupd.sh 
./cvsupd.sh: Cannot determine the PREFIX

In other words, type /usr/local/etc/rc.d/cvsupd.sh.

www configuration
I modified /usr/local/etc/apache/httpd.conf to add a new virtual web, http://www.nz.freebsd.org/.   Then I also added www.nz.freebsd.org to my zone files (but you won't see that in the examples).  I also remembered to update my serial number!  Then I re-HUP'd both daemons:
killall -HUP httpd
ndc reload

And the www mirror was online!

ftp configuration
The ftp configuration was much harder to do.  Actually, it wasn't harder, it just involved some dead ends.  I've put that in a separate article titled Creating an FTP Mirror site.

Need more help on this topic? Click here
This article has no comments
Show me similar articles