During this week I had installed and configured Subversion and Cruise Control in my office. We all know its relatively simple to configure these but then also here in this post I am just writing the installation and configuration of Subversion into some simple steps. Hope it will be helpful to any of you in future [ Surely. for me too
].
Versions used here are:
Apache HTTP Server 2.2 [ Download] and Subversion 1.4.6 [Download]
1. Installing Apache HTTP server.
Download the Apache HTTP Server from Here. You can download the binary version or the Windows installer from the site. Specify a location to install, for example here Im using D:\Subversion\Apache\Server.
2. Installing Subversion.
Download the Subversion installer from Here. Just follow the steps in the instalation wizard to install the subversion. Here I am installing subversion into the root folder with a different child direcotry. D:\Subversion\Subversion
3. Configuring the Apache Server.
Okey.. So u completed two “Complex”
steps now. But the third one is very simple. It contains two steps
-
- Copy the files mod_authz_svn.so and mod_dav_svn.so from the [Installation path]\Subversion\bin folder to the [Installation path]\modules folder. Actually we are adding two module files into the Apache server.
- Go to the conf directory of Apache server [Installation path]\conf and edit the httpd.conf file. Add the following lines into the modules including part
LoadModule dav_module modules/mod_dav.so
LoadModule dav_svn_module modules/mod_dav_svn.so
LoadModule authz_svn_module modules/mod_authz_svn.so
3. Creating the Project repository locations.
Create a Repository Folder where you want to store all the projects. For example I am creating folders called DFRepository and SFRepository in my E drive.
E:\Repositories\DFRepository
E:\Repositories\SFRepository
These are just directories to hold our repositories, now we must create the repositories themselves, using the svnadmin utility
Then Subversion will create a folder predifined structure inside this repository folder.
4. Creating the Users authentication file
We can create a folder called etc in the root location where we had installed Subversion and Apache server. Open the command promt and just go to the bin directory of Apache Server and run the following commands.
htpasswd -cm D:\Subversion\svn-auth-file usernameOne
New password: *****
Re-type new password: *****
Adding password for user usernameOnehtpasswd -m D:\Subversion\svn-auth-file usernameTwo
New password: *****
Re-type new password: *****
Adding password for user usernameTwo
When using the command for the first time, add the -c option. This creates the file named D:\Subversion\svn-auth-file . The -m option instructs the htpasswd utility to use MD5 algorithm to encrypt the passwords.
5. Creating the Access – rights file
Create a file called svn-acl in the etc folder and add the following content into it. You can modify this content as per your need.
# specifinh groups here
[groups]
DFTeam = name1, name2
# DFTeam group has a read/write access to ‘DFRepository’ repository
# all subdirectories; all others have read access only
[DFRepository:/]
@DFTeam = rw
* = r
# ‘SFRepository’ repository, only harry and sally have read-write access.
[SFRepository:/]
harry = rw
sally = rw
* = r
# ross is helping with the time zone part of the project2
[SFRepository:/timezone]
harry = rw
sally = rw
ross = rw
* = r
6. Creating the SVN Location module
Create another file called Subversion.conf in the same etc folder which contains the following data.
<Location /DFRepos>
DAV svn
SVNPath E:\Repositories\DFRepositoryAuthType Basic AuthName "Subversion Project1 repository" AuthUserFile c:/etc/svn-auth-file Require valid-user AuthzSVNAccessFile c:/etc/svn-acl </Location> <Location /SFRepos> DAV svn SVNPath E:\Repositories\SFRepositoryAuthType Basic AuthName "Subversion Project2 repository" AuthUserFile c:/etc/svn-auth-file Require valid-userAuthzSVNAccessFile c:/etc/svn-acl </Location>
If u dont want to include the access defenitions file and just want to check the user is valid or not the just change the Subversion.conf as follows.
<Location /SFRepos> DAV svn SVNPath E:\Repositories\SFRepositoryAuthType Basic AuthName "Subversion Project2 repository" AuthUserFile c:/etc/svn-auth-file <LimitExcept GET PROPFIND OPTIONS REPORT> Require valid-user </LimitExcept>
</Location>
7. Configuring Location in httpd.conf file
This is very simple step. Just add this Subversion.conf file to the end of httpd.conf file as follows
Include D:\Subversion\etc\subversion.conf
Restart the Apache Server
. Finished…
Reference: This link helped me a lot to configure the repository
Popularity: 19% [?]
Related posts:
- Apache Geronimo Project The goal of the Geronimo project is to produce...
- Creating Web services using Apache CXF (Part 1) : The Basics. As we discussed in the previous post, CXF is...
- Creating Web services using Apache CXF (Part 3): Configurations We have to declare Spring Context Listener, CXF Servlet, Spring...
Related posts brought to you by Yet Another Related Posts Plugin.
8 Responses to “Installing Subversion? Just follow this 7 Steps”
Good post. Have you tried BitNami Subversion Stack http://bitnami.org/stack/subversion? You can save some steps
Or, you could just install VisualSVN Server [0].
Great article though. This is great information to have available when you’re in a bind and can’t remember the exact syntax for configuring Apache.
[0]: http://www.visualsvn.com/server/
I would also recommend SVN1ClickSetup, which does everything in a wizard-like fashion and eliminates a *lot* of dependencies:
http://svn1clicksetup.tigris.org/
I had a remotely-accessible subversion server up and running about 15 minutes after discovering this.
[...] Installing Subversion? Just follow this 7 Steps. [...]
[...] (Using the latest technology which gives us more options and easiness to handle projects). Created a new SVN environment and Configured the SVN with Cruise [...]
You have -cm in both the steps on the user creation. The second one should just be -m otherwise you overwrite the user you just created.
Ryan, You are right! I changed it. Thanks a lot.
[...] Click here to Read Full Article [...]
Leave a Reply: