enable subversion server come with Leopard

Mac Leopard actually come with subversion server and client that integrated with its own apache2.


Steps to enable it:

LoadModule dav_svn_module libexec/apache2/mod_dav_svn.so
LoadModule authz_svn_module libexec/apache2/mod_authz_svn.so

    • enable httpd-ssl.conf by removing the comment from the following line in /etc/apache2/httpd.conf:

    Include /private/etc/apache2/extra/httpd-ssl.conf

    • Add the following line at the end of file /etc/apache2/extra/httpd-ssl.conf but before the </VirtualHost>
    DAV svn
    SVNPath /opt/repos
    AuthType Basic
    AuthName “Authorization Realm”
    AuthUserFile /etc/svn-auth-file
    Require valid-user
    • create the /etc/svn-auth-file using the following command to create user id. It will prompt for password twice

    htpasswd -cm /etc/svn-auth-file

    • restart apache by

    /usr/sbin/apachectl restart

    • mkdir the subversion repository, generate the first repository and change ownership of the folder to match with apache user

    mkdir /opt/repos

    svnadmin create /opt/repos
    chown -R www:www /opt/repos
    • test the access to subversion server using the https://127.0.0.1/svn/
    • try with svn co https://127.0.0.1/svn/trunk –username

    Leave a Reply

    Your email address will not be published. Required fields are marked *