SVN: Setting Up Subversion Server

Install Subversion 1.4.4 (note: for Apache 2.2.4):
1. Download svn-win32-1.4.4.zip
2. Copy all contents into /Apache
3. Move mod_authz_svn.so & mod_dav_svn.so into /Apache/Modules
4. Make sure /Apache/bin is in the environment Path

Create Repository at /Apache/htdocs/svn by typing:
1. svnadmin create "C:\...\Apache\htdocs\svn"

Change the permission of the svn directory:
1. chmod -R 777 "C:\...\Apache\htdocs\svn"

Edit httpd.conf, add the following:
LoadModule dav_module modules/mod_dav.so
LoadModule dav_fs_module modules/mod_dav_fs.so
LoadModule dav_svn_module modules/mod_dav_svn.so
LoadModule authz_svn_module modules/mod_authz_svn.so

Add the following to the httpd-vhosts.conf file:
<VirtualHost 127.0.0.2>
    DocumentRoot "C:/Konami/Web/Apache/htdocs/svn"
    ServerName svn.localhost.com
    ServerAlias www.svn.localhost.com
    <Location />
        DAV svn
        SVNPath "C:\...\Apache\htdocs\svn"
        AuthType Basic
        AuthName "Subversion Repository"
        AuthUserFile "C:\...\Apache\conf\svn.auth"
        Require valid-user
    </Location>
</VirtualHost>

Add user authentication file by typing:
htpasswd -c "C:\...\Apache\conf\svn.auth" username
Enter your username password twice

Restart Apache Server. Done!

No comments: