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")
-
Run the installer downloaded above. By default this will install svn to %programfiles%\Subversion and modify the global path appending the bin directory.
-
You need to create an additional system variable:
SVN_EDITOR
%windir%\notepad.exe
-
Create a local repository by running the command line, this will create the physical directory and a top level repository in subversion:
-
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.
-
Edit c:\repos\conf\svnserve.conf
anon-access = read
auth-access = write
password-db = passwd
-
Enable the test users by un-commenting the lines in file c:\repos\conf\passwd
[users]
harry = harryssecret
sally = sallyssecret
-
Start the service (check the eventlog if you have any problems):
Create a Test Folder
Now we're up and running lets create a test to make sure everything is working.
- Create a sub folder in the top level repository by running the command line :
svn mkdir svn://localhost/test
- Notepad should launch with a test file, edit the first line and close:
- You'll be prompted for a login so enter the user details from the passwd file (sally/sallyssecret)
- 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.
08fa67d8-7f61-4e83-906f-bdbfc50a77ad|0|.0