Rob Gonda's Blog

SVNServe Vs Apache

SVN, short for Subversion, is a source control system similar to CSV, but IMHO better. Anyways, it is extremely simple to install the server, for Windows or Linux servers. SVN will take care of versioning, but if you need to serve it over IP you must use an additional tool, SVNServe and Apache being the two main (only?) choices.

If you have to choose one, here are a few points to take into consideration.

  • Both work with Windows and Linux
  • SVNServe for Windows allows to serve a single repository; SVNServe for Linux allows unlimited
  • Apache allows to serve unlimited repositories in both OS.
  • svn1clicks allows to fully install SVN + SVNServe in Windows
  • SVNServe runs on port 3690, Apache runs on port 80
  • Apache allows to run encrypted SVN over HTTPS -- port 443
  • Apache allows to authenticate against an htpassword file, ldap, or other methods. SVNServe uses a clear text passwd file.
  • SVNServe and Apache allow per repository authentication, including None, R, or RW. Apache allows per folder access restrictions too.
  • Apache requires to restart/reload configuration everytime a change is made. SVNServe picks it up automatically.
Those are the main points I can think of right now, there may be more, so please share your personal experience.

I have two setups at the moment, one running SVN+SVNServe for Linux, and the other is SVN+Apache in a Windows box. In fact, this box is running IIS6 and Apache with no conflicts, which you can accomplish by either having multiple IPs, or assigning a special port for Apache.

My client tools are TortoiseSVN and SubEclipse. I tried SVN Ant a couple of times, but I gave up... running SVN in the command line with Ant.

TrackBacks
There are no trackbacks for this entry.

Trackback URL for this entry:
http://www.robgonda.com/blog/trackback.cfm?D1BCAB5D-3048-7431-E48932F00FBAAE54

Comments
I would like to *think* I am not a total moron, but I have tried and tried to get an SVN repository up and running and I just can't get it to work. It drives me nuts....

Are there any 'plain english' guides on how to get it up and running?
# Posted By Neil Bailey | 8/2/06 11:56 PM
Hey Rob,

This is a pretty good overview of some the differences between the 2 servers. The only 2 other points I would add is that I have seen several comments on the net of folks having problems with svnserve not handling concurrent requests very well. So if you work in a team environment you are much better off running it through apache.

The other thing I would add is that using svnserve you also have a secure option. In addition to the svn:// protocol you can also use the svn+ssh:// protocol to channel all your communications through a secure channel with standard ssh access permissions.

Also I am not 100% sure on this one, but I thought you could point the the -d attribute of the svnserve exec to a directory that contains your repositories, then you can access multiple repositories with svnserve on windows as well.

I am working on a svn faq for some of the things I have come accross, I have a few more points to add to it, but its started at http://simb.net/index.cfm?fuseaction=content.displ... I will add more to that in the future.
# Posted By Simeon | 8/2/06 11:57 PM
Neil if you are trying to get things set up for the first time I really recommend the svn1click setup. Its kinda limiting in how it starts you off, but for your first repository its fine.

I will install svn, setup svnserve and install tortoiseSVN so you have right-click filestyem access to your svn commands.

The biggest hurdle for most users is the first time you set up your project, you start by importing your project files. They often forget to then do a checkout of that project to start working on and commiting changes.

HTH
# Posted By Simeon | 8/3/06 12:00 AM
Simeon, great additions, thanks! I forgot about SVN+SSH, silly me.

I had no luck running multiple repo's with Windows, but I haven't tried again since 6 months ago... Apache is your friend.

Neil, I would do as Simeon said, run svn1click setup file. If you need more details, check out these two posts.
http://www.robgonda.com/blog/index.cfm/2005/7/7/Su...
http://www.robgonda.com/blog/index.cfm/2005/11/30/...

My setup is exactly what I described in my second post, to the t. I have additional information on setting up new repos, users, and such, which I can post later... try to get your initial setup done first.
# Posted By Rob Gonda | 8/3/06 12:30 AM
If you are running on Windows, TortoiseSVN includes pretty good documentation for setting up a server:

http://www.tortoisesvn.net/docs/release/TortoiseSV...

svnserve on Windows can serve multiple repositories, just as it does on Linux. Also, as of Subversion 1.3., svnserve on all platforms supports the same path-based authorizations as Apache.

I prefer Apache because of SSL and the authentication options it provides. That being said, svnserve is much, much faster and working copies against an Apache repository are larger because they have to store some extra files to support DAV methods.

Basic steps to get Subversion running via svnserve:

1) Create a folder to hold repositories: C:\repos or /opt/repos or something like that.

2) Create repositories:

svnadmin create C:\repos\repos1
svnadmin create C:\repos\repos2

3) If using svnserve, then you need to edit the svnserve.conf file in C:\repos\repos1\conf to set the access settings.

4) Start svnserve as a daemon, serving multiple repositories:

svnserve -d -r C:\repos

It should not be too hard to find some documentation on how to run this as a Windows service or from inetd. Subversion 1.4 includes built in support to install and run svnserve as a service.

Mark
# Posted By Mark Phippard | 8/3/06 9:06 AM
This blog is running version 5.9.003. Contact Blog Owner