Enter me - I was till last week in another place where we used SVN and Cruise Control on a daily basis. So when I saw an opportunity to teach a few things, I jumped in.
What we had was very basic - two desktop machines. No server, no backup and certainly no one willing to maintain my SVN.
I took the simplest approach
1. Download and install Apache HTTP server 2.2.x from here
2. Download and install/unzip the Apache bindings for subversion from here
3. Install Tortoise SVN from here
After this I had to do a few steps manually
1. Go to the folder where you unzipped the SVN binaries for Apache and look for mod_dav_svn.so and mod_authz_svn.so. Copy these to the modules folder under Apache
2. Copy the libdb*.dll and the intl3_svn.dll files from the bin folder where you unzipped the SVN Apache binaries and put them under the Apache bin folder
3. Add the bin folder under the SVN binaries folder to the system PATH
Now the next step is make some changes to the Apache httpd.conf file
Go to the LoadModule section and uncomment the lines corresponding to mod_dav_fs.so and mod_dav.so. Also add the following two lines at the end of the LoadModule section:
LoadModule dav_svn_module modules/mod_dav_svn.so
LoadModule authz_svn_module modules/mod_authz_svn.so
Now we need to tell Apache where our SVN repository is. Add the following to the end of your Apache httpd.conf file:
DAV svn
SVNListParentPath on
SVNParentPath [Folder where all your repositories will be]
#SVNIndexXSLT "/svnindex.xsl"
AuthType Basic
AuthName "Subversion repositories"
AuthUserFile passwd
#AuthzSVNAccessFile svnaccessfile
Require valid-user
Just substitute the path under which you want to put all your SVN repositories.
The above XML tells Apache that you will authenticate with the SVN repository using apache user ID. So, go to the Apache home directory and run the following command to create a passwd file with a user ID and password:
bin\htpasswd -c passwd
If you already have a passwd file, then type
bin\htpasswd passwd
This will add a new user to the existing file.
With this we have set up everything on the Apache side. Go and restart the Apache server.If you open your browser and navigate to http://localhost/svn - it should ask you for a user id and password and should show an empty list of SVN repositories.
You need to set up a repository.
Go to the folder which you specified as the SVNParentPath. Create a folder called "Project" where Project is the name of the project for which you are setting up SVN. Now go into that folder and if you right click your mouse and go to the Tortoise SVN menu, you will see an option saying "Create respository here". Click that and a few files and folders appear in that folder. The repository is created.
You can create multiple folders under this parent path and create a repository in that folder.
Now if you browse to http://localhost/svn/Project , you can see the repository!
Of course you need to add some files to this.
You can do this through Tortoise SVN, or any other client or from Eclipse using Subclipse.

0 comments:
Post a Comment