Old:Installing SVN: Difference between revisions

From The Uniform Server Wiki
Jump to navigation Jump to search
No edit summary
 
No edit summary
Line 16: Line 16:


== Configuring SVN ==
== Configuring SVN ==
# Create an empty folder (I used W:\www\svn), which will used as repository root.
# Create an empty folder (I used W:\svn), which will used as repository root.
# Create another empty folder (for example W:\www\svn\test) in your repository root.
# Create another empty folder (for example W:\svn\test) in your repository root.
# Open the Command Prompt (or MS-DOS Prompt in Win 9x), cd into your repository root. Execute:<pre>svnadmin create --fs-type bdb test</pre>or<pre>svnadmin create --fs-type fsfs test</pre> ''Note: test is the folder you created (under your repository root) earlier in Step #2; for more info on which fs-type to choose, read [http://svnbook.red-bean.com/en/1.1/ch05.html#svn-ch-5-sect-1.2.A Chapter 5, Repository Data-Stores] in the SVN book for more information ''
# Open the Command Prompt (or MS-DOS Prompt in Win 9x), cd into your repository root. Execute:<pre>svnadmin create --fs-type bdb test</pre>or<pre>svnadmin create --fs-type fsfs test</pre> ''Note: test is the folder you created (under your repository root) earlier in Step #2; for more info on which fs-type to choose, read [http://svnbook.red-bean.com/en/1.1/ch05.html#svn-ch-5-sect-1.2.A Chapter 5, Repository Data-Stores] in the SVN book for more information ''


Line 24: Line 24:
<Location /svn>
<Location /svn>
     Dav svn
     Dav svn
     SVNParentPath /www/svn
     SVNParentPath /svn
     AuthType Basic
     AuthType Basic
     AuthName "Subversion Repositories"
     AuthName "Subversion Repositories"
     AuthUserFile /htpasswd/www/svn/.htpasswd
     AuthUserFile /htpasswd/svn/.htpasswd
     <LimitExcept GET PROPFIND OPTIONS REPORT>
     <LimitExcept GET PROPFIND OPTIONS REPORT>
         Require valid-user
         Require valid-user
Line 39: Line 39:
# If you are using version 3.3, please skip to step 4.
# If you are using version 3.3, please skip to step 4.
# Create a "htpasswd" directory in the W:/ drive if you are using version 3.2 or less.
# Create a "htpasswd" directory in the W:/ drive if you are using version 3.2 or less.
# Create a "www" directory under the "htpasswd" directory you just created.
# Create a "svn" directory under the "htpasswd" directory.
# Create a "svn" directory under the "www" directory.
# Copy the .htpasswd file into the "svn" directory.
# Copy the .htpasswd file into the "svn" directory.
# Now, the time you've all been for. Restart Uniform Server.
# Now, the time you've all been for. Restart Uniform Server.

Revision as of 18:04, 11 April 2005

This article is a currently in Beta Stage, there are some problems mentioned in the Installing SVN Discussion Page. Please take your time to read that and be sure to report other errors you encounter.

This guide show you how to install a Subversion (SVN) server with Uniform Server. This guide assumes that you have a clean installation of Uniform Server running currently and do not have another version of Apache installed on your PC.

Installing SVN

  1. Download the latest Win32 SVN binaries from here. This guide uses the .exe Installer provided there.
  2. After installing / unpacking it, copy the contents of its httpd folder (usually C:\Program Files\Subversion\httpd) into Apache's module directory (Uniform Server's default is W:\usr\local\Apache2\modules)
  3. Copy libdb42.dll from the bin folder into the same module directory.

Apache Module Configuration

  1. Edit Apache's configuration files (W:\usr\local\Apache2\conf\httpd.conf) and uncomment (remove the # from) this line if it is commented:
    LoadModule dav_module modules/mod_dav.so
  2. Next find:
    LoadModule dav_fs_module modules/mod_dav_fs.so
    and add this below it:
    LoadModule dav_svn_module modules/mod_dav_svn.so

LoadModule authz_svn_module modules/mod_authz_svn.so

Configuring SVN

  1. Create an empty folder (I used W:\svn), which will used as repository root.
  2. Create another empty folder (for example W:\svn\test) in your repository root.
  3. Open the Command Prompt (or MS-DOS Prompt in Win 9x), cd into your repository root. Execute:
    svnadmin create --fs-type bdb test
    or
    svnadmin create --fs-type fsfs test
    Note: test is the folder you created (under your repository root) earlier in Step #2; for more info on which fs-type to choose, read Chapter 5, Repository Data-Stores in the SVN book for more information

Integrating Apache + SVN

  1. Add this anywhere in your configuration file (preferably between "<IfModule mod_dav.c>" and "</IfModule>"):

<Location /svn>

   Dav svn
   SVNParentPath /svn
   AuthType Basic
   AuthName "Subversion Repositories"
   AuthUserFile /htpasswd/svn/.htpasswd
   <LimitExcept GET PROPFIND OPTIONS REPORT>
       Require valid-user
   </LimitExcept>

</Location>

Note: If you do not want your repository to have read access for everyone (those who do not have the password) remove the <LimitExcept>

  1. /www/svn is the path to your repository root, if you used any drive other than what Apache is on (Uniform Server default = W:\) for your repository root, you'll have to put the drive letter in front of the / (for example, C:\SVN becomes C:/SVN)
  2. Finally, let's create the .htpasswd file which will store the username & password needed to modify your repositories. Open the Command Prompt again, cd into Apache's bin directory (W:\usr\local\Apache2\bin). Execute:
    htpasswd -c .htpasswd <username>
    To add more usernames & passwords, execute:
    htpasswd .htpasswd <username>
    Note: Replace <username> with the username of your choice.

Last Steps

  1. If you are using version 3.3, please skip to step 4.
  2. Create a "htpasswd" directory in the W:/ drive if you are using version 3.2 or less.
  3. Create a "svn" directory under the "htpasswd" directory.
  4. Copy the .htpasswd file into the "svn" directory.
  5. Now, the time you've all been for. Restart Uniform Server.
  6. Point your browser to http://localhost/svn/test (where test is the name of the repository you created earlier)

Shortcuts

  1. If you do not understand how to make the .htpasswd file, you can just make the file and edit it with the contents "username:password" in the file.