Install Subversion on Apache and Windows
Subversion is an open-source revision control system. It is used to maintain current and historical versions of files such as source code, web pages, and documentation. You can read the description from Wikipedia page.
How to install Subversion on Apache and Windows platform? Here’s how?
1. Install Apache or LAMP package. I wont tell you much about this, assuming that you already know about Apache or LAMP.
2. Download Windows binaries from Subversion site. Choose a version suitable with your Apache. You can download the latest version (current version is 1.5), but also download a previous version (1.4.6). Why do I need two version? I installed Subversion 1.5, got a problem when turned on Apache. Apparently, apache modules in Subversion 1.5 not compatible with Apache 2.2 (I’m using Apache 2.2), but if your Apache is version 2.2.9 or higher you don’t need Subversion 1.4.6.
I choose to download .zip package file, not the installer (.exe) file.
3. Extract Subversion 1.5 zip package file , and put the Subversion extracted from zip to a directory your choice (usually C:\Program Files)
4. Now extract Subversion 1.4.6 zip package file, donot put Subversion 1.4.6 into Subversion 1.5, it will be better if you extract Subversion 1.4.6 to temporary directory. Browse through Subversion 1.4.6 directory and find the files /bin/mod_dav_svn.so and mod_authz_svn.so. Copy these files to the Apache modules directory (usually C:\Program Files\Apache Group\Apache2\modules). You can delete Subversion 1.4.6 now.
5. Copy the file /bin/libdb*.dll and /bin/intl3_svn.dll from the Subversion (version 1.5) directory to the Apache bin directory
6. Open and Edit Apache’s configuration file (usually C:\Program Files\Apache Group\Apache2\conf\httpd.conf) with a text editor such as Notepad and make the following changes:
find Apache’s module section,
Uncomment (remove the ‘#’ mark) the following lines:
#LoadModule dav_fs_module modules/mod_dav_fs.so
#LoadModule dav_module modules/mod_dav.so
Add the following two lines to the end of the LoadModule section.
LoadModule dav_svn_module modules/mod_dav_svn.so
LoadModule authz_svn_module modules/mod_authz_svn.so
7. Need to create passwd file for Apache, this is useful if you are going to show authentication when someone access your Subversion. Just open MS-DOS command (cmd) from Start Menu > Accessories > Command Prompt or Start Menu > Run > cmd. Change to the apache2 folder (usually C:\Program Files\Apache Group\Apache2) and create the file by entering :
bin\htpasswd -c passwd
8. Add Subversion 1.5 directory to Windows Enviroment Variable, so you can run Subversion command from MS-DOS command. Open System Properties in Control Panel, Go To Advanced Tab, Go To Enviroment Variable, Find PATH inside System Variables, choose Edit Button, add full path of Subversion directory into the list.
9. Don’t close/exit from MS-DOS command. Create Subversion Repo directory, run this :
svnadmin create [full path of a directory where you put SVN repositories in Apache-usually home or www/name of directory] e.g
svnadmin create C:\Program Files\Apache Group\Apache\www\svn
10. Back to Apache’s httpd.conf file. Add these to the end of config file :
DAV svn
SVNListParentPath on
SVNParentPath “full path of a directory where you put SVN repositories in Apache-usually home or www”
AuthType Basic
AuthName “Subversion Repositories”
AuthUserFile passwd
Require valid-user
Save httpd.conf and run Apache.