os x howto
hosting SVN server on your Mac (under OS X Leopard)
I do not assume any responsibility for any damage resulting from you following these instructions. The sequence of steps described below worked fine for me. As always, YMMV. Use at your own risk.
Credit for the
This tutorial describes the basic setup when your SVN repository:
why would you want to host a SVN server?
Recently I realized that I've acquired many projects that needed some structuring. It seems logical to introduce some sort of a version control, and keep my projects in one place (my workstation) which would be backed up on a regular basis. I decided to backup my files with Leopard's build-in feature called Time Machine, and use the Subversion (SVN) to track the changes in my codes and webpages. SVN server has many advantages &mdash you can access your code from anywhere, you can share your code in a controlled manner, and (probably the most important aspect) if you introduce a bug in your code at some point, you can revert to earlier version.
launch the SVN daemon
First, enable SVN server on your computer. Leopard comes with a user
To do this, type
Then copy the following into the window:
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>Disabled</key> <false/> <key>Label</key> <string>org.tigris.subversion.svnserve</string> <key>UserName</key> <string>_svn</string> <key>GroupName</key> <string>_svn</string> <key>Umask</key> <string>002</string> <key>ProgramArguments</key> <array> <string>/usr/bin/svnserve</string> <string>--inetd</string> <string>--root=/Users/Shared/svn</string> </array> <key>ServiceDescription</key> <string>Subversion Standalone Server</string> <key>Sockets</key> <dict> <key>Listeners</key> <array> <dict> <key>SockFamily</key> <string>IPv4</string> <key>SockServiceName</key> <string>svn</string> <key>SockType</key> <string>stream</string> </dict> <dict> <key>SockFamily</key> <string>IPv6</string> <key>SockServiceName</key> <string>svn</string> <key>SockType</key> <string>stream</string> </dict> </array> </dict> <key>inetdCompatibility</key> <dict> <key>Wait</key> <false/> </dict> </dict> </plist>
Now hit Escape and type ":wq". This saves the file and exits the editor.
creating home directory for SVN repositories
Now that you have enabled the deamon which runs whenever your machine is up (regardless whether you are logged in or not), you want to create the home directory for the user "
Also you want to make sure that only user
Now it is a good time to reboot your machinei so the SVN server will be running.
Now suppose you want to create a repository named
To check whether your SVN server is running, go to a temporary directory (e.g.,
Certainly, you would like to host multiple code repositories (that is, more than one code). Just repeat the steps above for every new code you decide to use SVN for.
A list of useful things to do after this would be
using Apache webserver and SVN
There are several reasons to use Apache module instead of the standalone SVN server. Some of those are:
If you run SVN with Apache authentication using HTTPS protocol, you need to change the ownership of the repositories to the user
Go to the directory where you code is at, then type
For the rest, see the link from the list here
Copyright © 2009 Sergei Chumakov
Last modified Jul 28 2010 16:29
Accessed 6925 times