I'm here installing Subversion 1.5.2 (SVN) on Windows 2000 Server. First tried setting it up with Apache but after failing to do so because of some permission issue, and hearing that there at least in the past have been issues with WebDAV, particular about security, and finding out that Apache is not at all needed, I skipped the whole Apache part. The backdraw is that you cannot use Windows authentication for your svn users.
This tutorial is based on Team System - Setting up a Subversion Server under Windows - credit goes to them. My tutorial differs in that I'm setting up the Windows service using the native support from svnserve.exe for doing so instead of using a wrapper (supported from version 1.4 - see link above for further details). Also I have not set up SVN_EDITOR environment variable because I will never use the server itself to commit stuff (If you don't understand this, never mind, you don't need to!).
|Install Subversion||Download the latest version from http://subversion.tigris.org/ and copy content of zip files to somewhere, eg. under c:/Program Files/Subversion/.|
|Add directory to environment variable "path"||
Add path to the bin folder to the environment variable PATH.
I had to restart the computer for this to take effect.
|Create repository root folder||The next step is to create a directory which will be a root for all the repositories of our source control. Eg. create the directory c:\svnroot|
|Create a test repository||
If you are told that MSVCP60.DLL is missing, you can download it from http://www.dll-files.com/dllindex/dll-files.shtml?msvcp60 and put it in your c:\windows\system32 folder.
|To run Subversion as a daemon||
Running Subversion as a daemon means that you have to log on to Windows and start the daemon (program) through the command line. That will bring up a windows running undefinitely. The command is:
svnserve --daemon --root "c:\svnroot"
Run this command to create a folder in the test repository to see if everything is working fine so far:
svn mkdir svn://localhost/test1/dir1 --message "This is my first checkin!"
You'll now be prompted for credentials. In my case I was prompted for the administrator credentials as well:
Authentication realm: 0f1a8b11-d50b-344d-9dc7-0d9ba12e22df Password for 'Administrator': ********* Authentication realm: 0f1a8b11-d50b-344d-9dc7-0d9ba12e22df Username: testuser1 Password for 'testuser1': ************ Committed revision 1.
Congratulations! You just checked a change into Subversion!
|To run Subversion as a Windows service||
Running Subversion as a Windows service means that it starts up automatically at boot time, you don't have to log on to the computer for it to run, and it runs nicely in the background. Note that only the newest versions of Subversion support natively running as a Windows service. Before version 1.4 you had to use a Windows service wrapper to imitate this. Read more about that here.
The full command to install Subversion as a Windows service is:
sc create svn binpath= "\"c:\Program files\Subversion\bin\svnserve.exe\" --service -r c:\svnroot" displayname= "Subversion Server" depend= Tcpip start= auto
Put all this on one line with a space between the two lines. Replace the path to svnserve.exe with the path to where you installed Subversion - and also the svn root folder if you put it somewhere else. Be careful to include the space after the equal signs (=).
When installed, start it by going to Control Panel -> Administrative Tools -> Services and right-click to Subversion Server service and select Start.
|Set up the shell extension (TortoiseSVN)||
And we're done! You now have a networked Subversion server and client set up on your machine. Note that the default port for svnserve is 3690. Accessing the server from computers outside your firewall probably require that you open this port in your firewall. Google "open port in firewall" if you need help with that and consult your router manual.
Remember to set up backup of your repositories using either dump or hotcopy command of svnadmin.
As said in the beginning, most of the credit here goes to Team System - Setting up a Subversion Server under Windows.