Dan posted on July 6, 2009 15:54

I had a search around for information on installing Subversion on a Windows server and found a few articles but all seemed to be out of date or just didn't work!  So here's another step-by-step guide to installing subversion on a Windows Server (I wrote this as I installed so it should be complete!)

Note: Here I'm documenting installing Subversion 1.6.3 on to a Windows 2003 Server.

Installation and Configuration:

Download the latest binary installer:
http://subversion.tigris.org/servlets/ProjectDocumentList?folderID=8100&expandFolder=8100&folderID=91
(I went for "Setup-Subversion-1.6.3.msi")

  1. Run the installer downloaded above.  By default this will install svn to %programfiles%\Subversion and modify the global path appending the bin directory.
  2. You need to create an additional system variable:
    SVN_EDITOR
    %windir%\notepad.exe
  3. Create a local repository by running the command line, this will create the physical directory and a top level repository in subversion:
    svnadmin create c:\repos
     
  4. Configure Subversion to run as a windows service.  If you don't want to setup Apache then subversion comes with a lightweight server called SvnServe that runs over TCP/IP, according to the docs its good for smaller installations.

    Run from the command line:
      sc create svnserve binpath= "\"C:\Program Files\Subversion\bin\svnserve.exe\" --service --root c:\repos" displayname= "Subversion" depend= tcpip start= auto obj= "NT AUTHORITY\LocalService"

      sc description svnserve "Subversion Server (svnserve)"


      This will create a windows service that runs under the LOCAL SYSTEM, ensure that this user has the appropriate permission to read/write Subversion and the repositories.
  5. Edit c:\repos\conf\svnserve.conf
    anon-access = read
    auth-access = write
    password-db = passwd

  6. Enable the test users by un-commenting the lines in file c:\repos\conf\passwd
    [users]
    harry = harryssecret
    sally = sallyssecret

  7. Start the service (check the eventlog if you have any problems):
    net start subversion


 Create a Test Folder

Now we're up and running lets create a test to make sure everything is working.

  1. Create a sub folder in the top level repository by running the command line :
    svn mkdir svn://localhost/test

  2. Notepad should launch with a test file, edit the first line and close: 
    image
  3. You'll be prompted for a login so enter the user details from the passwd file (sally/sallyssecret)
  4. You should get confirmation of a successful checkin!

 

Accessing Subversion Remotely

If you want to access Subversion remotely by default Subversion uses TCP port 3690 so just open this up on your firewall.

Troubleshooting

  • When starting the Subversion service you receive: "The service did not respond to the start or control request in a timely fashion."
    Ensure that the permissions are set on %programfiles%\Subversion and that the repository directory (c:\repos) exists.

Posted in: Source Control  Tags:
Dan posted on July 6, 2009 15:33

If you want to run Subversion through a firewall you'll need to open up port TCP port 3690.


Posted in: Source Control  Tags:

Calendar

«  March 2010  »
MoTuWeThFrSaSu
22232425262728
1234567
891011121314
15161718192021
22232425262728
2930311234
View posts in large calendar

Authors

Recent Comments

Banners

Theme Grabber
Disclaimer
The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

© Copyright 2010 Dan Gibbons .Net Developer