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:

Comments


July 7. 2009 08:56
trackback
Install Subversion On Windows Server 2003

You've been kicked (a good thing) - Trackback from DotNetKicks.com

http://www.dotnetkicks.com/other/Install_Subversion_On_Windows_Server_2003http://www.dotnetkicks.com/other/Install_Subversion_On_Windows_Server_2003


Russia Ivan Zhakov
July 12. 2009 22:30
Ivan Zhakov
Another way:
1. Download VisualSVN Server from http://www.visualsvn.com/server/download/
2. Install it.
3. Enjoy Subversion server and nice management console for free.

no site


United States John Bowers
July 22. 2009 14:35
John Bowers
Thanks for the info. I was wondering if you might know why I'm having an issue with the sc create program. I call it exactly as shown (except with the path to my repository) and all it does is print the DESCRIPTION/USAGE/OPTIONS info and if I try the sc description command it says there is no svnserve service.

no site


United States John Bowers
July 22. 2009 14:48
John Bowers
Nevermind, sorry about that. I was using parameter=value but sc requires parameter= value (with the space). Thanks so much for the post.

no site


United States John Bowers
July 22. 2009 14:49
John Bowers
BTW clicking on your name in the header image of the site takes me to a 404.

no site


July 23. 2009 09:18
Admin
Thanks John, I'll fix that now!

http://www.ifunky.net/http://www.ifunky.net/

Add comment




  Country flag

biuquote
  • Comment
  • Preview
Loading



Calendar

«  May 2012  »
MoTuWeThFrSaSu
30123456
78910111213
14151617181920
21222324252627
28293031123
45678910
View posts in large calendar

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 2012 Dan Gibbons .Net Developer