tags:

views:

169

answers:

6

I am setting up a new SVN server on Ubuntu Linux. Where is a good place (best practice) to put the repositories? Should I create a new user? The server will be accessed via http:// so no need to create user accounts etc (as was the case for svn://).

Many thanks in advance

A: 

I host my SVN via the apache module, so I usually put it under my apache user, at the same level as my htdocs, and setup a specific authentication just for SVN users. Not under htdocs, but same level.

If you have a lot of projects, dedicate another volume to SVN since it will grow.

mrjoltcola
+2  A: 

The new location for service data according to the FHS is /srv, so under there would probably be best.

Ignacio Vazquez-Abrams
+4  A: 

I like putting things under /srv, as it seems to match the definition in the FHS.

Callahad
OK I'll go with the majority decision. Actually all of the suggestions below makes sense, I initially put under /var/svn as well because its next to my htdocs, but I guess the standard is there for a reason...
alexloh
+1  A: 

I guess I'm kind of old school but I like to put things (apache,tomcat,...etc) in /usr/local. So I will usually create repositories in /usr/local/svn and have the Apache module reference that path in the httpd.conf

Vinny
That is old school. For a long time, there's been something of a Linux policy that files under /usr are more or less static. I put my repository under /var before I moved to Mercurial.
David Thornley
+1  A: 

I've always used /var/svn or /var/lib/svn. While it doesn't quite line up with FHS, it matches closer to what the other apps actually do (On RHEL5, Apache uses /var/www; PostgreSQL uses /var/lib/pgsql). As suggested, /srv/svn looks like another good spot. And you get to say "Look, I'm following the standard!"

Using either /usr/svn or /usr/local/svn would probably be considered bad form, and all your Linux friends will laugh at you behind your back :-)

dave
`/var/www` is an old cruftiness that the devs really, really wish they could fix.
Ignacio Vazquez-Abrams
A: 
/home/username/Dropbox

this way you backup the svn and can access it on a windows machine as well.

Milktrader