Six Steps to a Subversion Server on OS X with Darwinports
I’ve tried on at least three separate occasions to set up a CVS repository on my computer, but each time I’ve completely given up, mostly because getting the darn thing configured properly just seems to be beyond my abilities.
But besides that, CVS is really obsolete at this point, and Subversion has really taken over its status as the de facto standard for free, open-source revision control software.
Installation was yet another project that turned out to be super-easy with a little help from Darwinports.
Here’s the full set of steps to install:
-
Grab Apache 2 off Darwinports and get it running separately from the default OS X Apache 1.3 installation (PHP, MySQL, et al entirely optional). Darwinports’ Apache automatically includes
mod_dav, which you’ll need. -
Install Subversion and Apache’s dav_svn_module:
sudo port install subversion +mod_dav_svnDarwinports’ Subversion conveniently includes both server and client. Spiffy.
-
Decide where your repository is going to live. I set up a directory under my user directory, with the full path
/Users/myusername/svn -
Configure Apache to work with Subversion. First, add the following to the bottom of the list of
LoadModuledirectives inhttpd.conf:LoadModule dav_svn_module modules/mod_dav_svn.soThen add the following to the end of
httpd.conf:<Location /svn ># I think you can change "/svn" to whatever you want the path to be on your server.
DAV svn
SVNPath /Users/myusername/svn/ # Change this to the path you chose in Step 3, of course
</Location>If you want to keep your repository private — i.e. only accessible from the machine it’s hosted on, you can add a few lines, like so:
<Location /svn ># I think you can change "/svn" to whatever you want the path to be on your server.
DAV svn
SVNPath /Users/myusername/svn/ # Change this to the path you chose in Step 3, of courseOrder Deny,Allow
Deny from all
Allow from 127.0.0.1
</Location> -
Create your repository:
svnadmin create --fs-type fsfs /Users/myusername/svn -
Restart Apache
Whee, that was easy.
Browse to http://localhost:81/svn (substitute the appropriate port, of course, if you configured Apache differently) — and if you get something that looks like a really simple webpage, you’re set.
I’m kind of in love with Darwinports right now, in case you haven’t noticed. Next challenge: actually configuring a Subversion repository. I’m seriously crossing my fingers that this is easier than CVS.
Post a Comment