2009年11月7日 星期六

在 Mac OS X 10.6 安裝 SVN

Create User/Password for Access Control

sudo htpasswd -cm /etc/apache2/svn-auth-file username


Create /etc/apache2/other/svn.conf:

[sourcecode language="php"]
LoadModule dav_svn_module /usr/libexec/apache2/mod_dav_svn.so
<Location /svn>
DAV svn
SVNParentPath /Users/SVN-ROOT
SVNListParentPath on
AuthType Basic
AuthName "Subversion repository"
AuthUserFile /etc/apache2/svn-auth-file
Require valid-user
</Location>
[/sourcecode]

This will make the Subversion repository /Users/SVN-ROOT available at http://localhost/svn .

Update the repositories owner (otherwise commits would fail):


chown -R www:www /Users/SVN-ROOT


Restart Apache

sudo apachectl restart

沒有留言: