Skip to content

Instantly share code, notes, and snippets.

@ejlp12
Last active October 21, 2021 14:41
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save ejlp12/715aa6251f557d531810335ca210e79c to your computer and use it in GitHub Desktop.
Save ejlp12/715aa6251f557d531810335ca210e79c to your computer and use it in GitHub Desktop.
Subversion (SVN) server on Mac (OS-X)

Install SVN

$ brew options subversion
--universal
	Build a universal binary
--with-gpg-agent
	Build with support for GPG Agent
--with-java
	Build Java bindings
--with-perl
	Build Perl bindings
--with-python
	Build with python support
--with-ruby
	Build Ruby bindings
	
$ brew install --universal subversion

Create repository and add a project directory in the SVN repo

$ svnadmin create SVNREPO
$ svn mkdir file:///Users/ejlp12/SVNREPO/project1

Edit /Users/ejlp12/SVNREPO/conf/svnserve.conf

anon-access = none
auth-access = write
password-db = passwd

Edit /Users/ejlp12/SVNREPO/conf/passwd

[users]
# harry = harryssecret
# sally = sallyssecret
ejlp12 = password

Start SVN daemon

$ svnserve -d --root /Users/ejlp12/SVNREPO

Checkout project1 from SVN repo remotely

$ mkdir myworkspace && cd myworkspace
$ svn checkout svn+ssh://ejlp12@localhost/Users/ejlp12/SVNREPO/project1
Password: ********
Checked out revision 5.

It works!!

Install Apache HTTPD

$ sudo launchctl unload -w /System/Library/LaunchDaemons/org.apache.httpd.plist
$ brew tap homebrew/dupes
$ brew tap homebrew/apache
$ brew install -v httpd22 --with-brewed-openssl

Setting HTTPD

$ sudo vi /usr/local/etc/apache2/2.2/httpd.conf

Make sure this line is occur:

Include /usr/local/etc/apache2/2.2/extra/httpd-dav.conf
LoadModule dav_module libexec/mod_dav.so
LoadModule dav_fs_module libexec/mod_dav_fs.so

Add following lines:

LoadModule dav_svn_module /usr/local/Cellar/subversion/1.9.4/libexec/mod_dav_svn.so
LoadModule authz_svn_module /usr/local/Cellar/subversion/1.9.4/libexec/mod_authz_svn.so

Start httpd - ERROR

$ apachectl -f /usr/local/etc/apache2/2.2/httpd.conf -t
httpd: Syntax error on line 117 of /usr/local/etc/apache2/2.2/httpd.conf: Cannot load /usr/local/Cellar/subversion/1.9.4/libexec/mod_dav_svn.so into server: dlopen(/usr/local/Cellar/subversion/1.9.4/libexec/mod_dav_svn.so, 10): Symbol not found: _ap_log_error_\n  Referenced from: /usr/local/Cellar/subversion/1.9.4/libexec/mod_dav_svn.so\n  Expected in: flat namespace\n in /usr/local/Cellar/subversion/1.9.4/libexec/mod_dav_svn.so

???

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment