Installing Subversion on Windows

Subversion is an open-source version control system. It is used in production by many companies. There are other software products such as Collabnet that utilize this with it’s own features. It is supposed on windows, unix, and mac os x. Today we’re going to install Subversion on a windows environment.

THE FOLLOWING ARE THE SYSTEM SPECS I AM  USING

  • Microsoft Windows 2008 x64 Enterprise Edition
  • 1GB RAM
  • 25GB HD space
  • Apache 2.2.11
  • Subversion 1.6.5

FILE PREREQUISITES

Now, I am  using these specific versions that you can download and use. But if you want to get the latest versions, then you will want to go to the following sites.

http://httpd.apache.org/

http://subversion.apache.org/

FILE DIRECTORY LOCATIONS
Apache: E:\apache2.2
Subversion: E:\subversion
Repositories: E:\SVN
Password file: E:\subversion\subpass
Access permissions: e:\subversion\svn-acl

INSTALLATION

  1. Install Apache
  2. Install Subversion
  3. Copy the following files from the E:\subversion\Bin directory to E:\apache2.2\modules
    • mod_authz_svn.so
    • mod_dav_svn.so
  4. Edit E:\apache2.2\conf\httpd.conf
    • Uncomment the line
    • loadmodule dav_module
    • Add the following 2 lines in the same section
      LoadModule  dav_svn_module modules/mod_dav_svn.so
      LoadModule authz_svn_module modules/mod_authz_svn.so
    • Add the following to the end of the file
        include e:/subversion/subversion.conf
  5. Create the directory for the repositories
    • E:\SVN
  6. Create a TEST project1
    • svnadmin create e:\svn\project1
  7. Add a test user to the project1 repository
    • e:\apache2.2\bin\htpasswd -cm e:\subversion subpass test
    • The first time you run this command you use -c because it creates the password file
    • -m is the option that tells htpasswd command to use MD5 algorithm for encryption
  8. Now create e:\subversion\svn-acl to hold access permissions
    1. Add the following into this file
    2. #
      # specify groups here
      #
      
      [groups]
      team1 = test
      
      #
      # team1 group has a read/write access to test repository
      # all subdirectories
      # all others have read access only
      #
      
      [test:/]
      @team1 = rw
      * = r
      
  9. Now create e:\subversion\subversion.conf which will link subversion to apache
  10. <Location /project1>
      DAV svn
      SVNPath e:/svn/project1
    
      AuthType Basic
      AuthName "Subversion test project repository"
      AuthUserFile e:/subversion/subpass
    
      Require valid-user
    
      AuthzSVNAccessFile e:/subversion/svn-acl
    </Location>
    
  11. Restart Apache



Related posts:

  1. Apache web server on windows, how to password protect directory

You can follow any responses to this entry through the RSS 2.0 feed.