Friday, April 6, 2012

Setting up Subversion on Windows

There are a dozen ways to set up Subversion on Windows. I have done it at least three or more time and the last two times, I noticed I used different methods. On the server I used last, I am now stuck with an extra Apache instance so I am writing this blog so that other people don't make the same mistake. In addition, once you set up SVN, you should set up nightly backups as well where the repository is backed up on an external drive. That has saved me at least once when the host Windows OS failed on us once crashing the hard disks with it. One day I know I am going to be back on this page looking through my notes setting up SVN for the fourth time.

In our company we use Windows predominantly as there are many more people who are familiar with managing it, backing it. There is more software which can be re-used as well inside the organization. If I used Linux, which I am obviously more familiar with in terms of using SVN or as a product development box, I am sure the installation, backup and maintenance will be a lot simpler but then I am going to be stuck with it :) 

The first step to installing SVN on Windows is to find an idle server or install one from scratch. A Windows 2008 Server, 32 bit would enough. Make sure you put on some partitions on it to store the repositories since these can become huge. I would say put 250-400 GB in a separate partition or drive and use RAID on this server. In my case when the server crashed, it took down the RAID controller with it making the hard drives unusable. So you must still do backups. 

Second step is to make sure there is no IIS running on this box, since we will use the port 80 for SVN. Also make sure other software which grinds the disk is kept to a minimum (like SQL Server etc). You will possibly install MySQL on this server if you keep reading my blog.

Now you can download SVN binaries from one of the partners - Collabnet or WANDisco. You will need to register on their site before you download the binaries and make sure you dont download a "bundle" which includes other software like Apache. We will install that separately, or at least I did. By downloading it separately, you can get the latest Apache version which will work for you. Dont try to set up SVN as a service or anything since we will be using it with Apache.

On my machine for example, SVN got installed at: C:\Program Files\WANdisco\Subversion. Just note down where it gets installed on your system.

No comments: