18

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

2
  • Probably better to ask this on server fault... Commented Mar 19, 2010 at 19:38
  • That makes sense. I'll try to move it later. Commented Mar 20, 2010 at 22:38

6 Answers 6

19

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

Sign up to request clarification or add additional context in comments.

1 Comment

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...
5

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

Comments

3

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 :-)

1 Comment

/var/www is an old cruftiness that the devs really, really wish they could fix.
1

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.

Comments

1

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

1 Comment

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.
-4
/home/username/Dropbox 

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

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.