Webreakstuff's blog on design, development and strategy. Click here to subscribe.

Setting up Subversion on OSX

Fred Oliveira on March 17, 2005

Here’s a quick guide on setting up a webdav-powered “Subversion”:http://subversion.tigris.org server on Osx using darwinports. Why darwinports, you may ask? Personally, I prefer to organize all the software that lies beneath the aqua layer on Osx in a separate location (as darwinports does on the /opt/local directory), and because it makes the whole process much easier when setting up a development environment.

* Install darwinports using “their instructions”:http://darwinports.opendarwin.org/docs/ch01s03.html#install_dports
* On your terminal window, enter: sudo port install subversion +mod_dav_svn +python (if you don’t need python bindings remove the +python - if you’re not considering running “Trac”:http://projects.edgewall.com/trac/)

If you have a fresh darwinports installation, you didn’t have apache2 properly configured, so you need to run these two commands to setup a vanilla configuration file for apache that you’ll be editing later:

* cd /opt/local/apache2/conf/
* cp httpd-std.conf httpd.conf

Now that you have working subversion and apache2 installations, its time to glue them together and create your repository:

* Run svadmin create /path_to_your_new_repository
* Add “LoadModule dav_svn_module modules/mod_dav_svn.so” to your httpd.conf
* Add a new location to the apache configuration:


allow from all
DAV svn
SVNPath /path_to_your_repository
AuthType Basic
AuthName “Subversion Repository”
AuthUserFile /path_to_your_repository/passwd
Require valid-user

* Generate a new user to access your repository through the web: htpasswd -c /rep_path/passwd
* Start your apache2 server: /opt/local/apache2/bin/apachectl start and you’re done!
* Load http://localhost/svn/ on your browser to see the repository

Hope that clears some questions as to how to setup subversion on OSX using darwinports. Back to coding you go!


Comments on this post

Broqn - Development blog » Ruby on Rails with Darwinports

[...] r Ruby on Rails. This assumes you know how to setup darwinports (if you don’t, check this post): sudo port install ruby sudo port install rb-gems sudo gem instal [...]

Sorry, the comment form is closed at this time.