Recently, you need to install the Subversion server on lion. After searching online, you find that most methods require downloading and installing specialized SVN server software. But in fact, the default installation of Max OS X has built-in HTTP server and SVN support. We can complete the installation of SVN server through a few simple configurations.
The installation steps are as follows:
First, for your SVNCodeCreate a directory in the repository, open the terminal, and enter:
Sudomkdir/volumes/mydata/svnrootsudosvnadmin create/volumes/mydata/svnroot/Repo
Then, grant the WWW user the access permission to the directory (the user running the HTTP service)
Sudochown-r www/volumes/mydata/svnroot
Then configure the Apache server to support SVN. Use VI to create a file SVN. conf under/etc/apache2/other and enter the content
Repository/usr/libexec/apache2/Repository <location/SVN> Dav SVN svnparentpath/volumes/mydata/SVN/root authtype basic authname subversion repository authuserfile/etc/apache2/SVN-auth require valid-user </location>
Finally, add the user to be accessed (for example, the user name is Tom)
Sudohtpasswd-C/etc/apache2/SVN-auth Tom
Adding other users does not require the-C Parameter
After the HTTP server is restarted, you can access your SVN server through http: // localhost/SVN/repo.
Post: http://www.itlead.com.cn/article/html/267/2012-05-03/content-8533.shtml