How to setup Subversion (SVN) as service on Windows XP/2003

If you don't know what is Subversion (SVN), here is a short description about it.

"Subversion (SVN) is a version control system initiated in 2000 by CollabNet Inc. It is used to maintain current and historical versions of files such as source code, web pages, and documentation. Its goal is to be a mostly-compatible successor to the widely used Concurrent Versions System (CVS)." - from Wikipedia
  1. Download the latest Subversion from its website which located at<brhttp://subversion.tigris.org/servlets/ProjectDocumentList?folderID=8100&amp;expandFolder=8100&amp;folderID=91 The direct link for this file is <brhttp://subversion.tigris.org/files/documents/15/45600/svn-win32-1.6.1.zip
  2. Unzip "svn-win32-1.6.1.zip" to "C:/svn" and your file structure should look like below:
  3. Go to "Start" &gt; "Control Panel" &gt; "System" to open System Properties.
  4. Browse to "Advanced" tab and click "Environment Variables".
  5. At the "System Variables" section, look and select for the "Path" variable and press "Edit".
  6. At the end of "Variable value", add in
    ;C:\svn\bin
  7. Press OK to close current window.
  8. Create a folder named "Repositories" at your C drive. This folder will act as file database where all your versioned files will be saved here.
  9. Go to "Start" &gt; "Run". Insert "cmd" to open the command prompt. Insert "svnadmin create C:\Repositories" to create the versioning database.
  10. Now, we need to run out SVN as windows service. Go to "Start" &gt; "Run" and insert "cmd" to run command prompt again. Copy the following command and enter:
    sc create SVN binpath= "C:\svn\bin\svnserve.exe --service --root \"C:\Repositories\"" displayname= "Subversion Repository" depend= tcpip start= auto
    Please make sure you have a space after the "=" symbol for each parameter. I spent an hour here because of the spaces.
  11. Go to "Start" &gt; "Run". Insert "services.msc" to show windows services. Double click on the service called "Subversion Repository".
  12. Press "Start" button to start Subversion service.
  13. Your machine is now running as a SVN version control server.
  14. If your machine also running as a SVN client, you can download TortoiseSVN frhttp://tortoisesvn.tigris.org/.
  15. Once you have TortoiseSVN installed, you can access your repositories by browsing "svn://localhost/" at your Repository Browser.
  16. If your SVN server and client is on differece machine, you can access remote repositories by IP address. Example: "svn://192.168.1.221/".
  17. If you need to access your repositories over the internet, please make sure you have done the port forwarding to SVN server machine on port 3690 (default). You need this step when your SVN server is behind a firewall or router.
  18. If you need to set permission for your SVN server, you can do the following steps. a. Open "C:\Repositories\conf\svnserve.conf" with a text editor. b. Change the following lines: # anon-access = read to
    anon-access = none
    # auth-access = write to
    auth-access = write
    # password-db = passwd to
    password-db = passwd
    c. Open "C:\Repositories\conf\passwd" with a text editor. Add in users line by line using the format =. Example: admin=password123

Leave a Comment

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