header

How to setup a Subversion server and repository on FreeBSD



I had some trouble with this some months ago, so I thought I would create a guide to do it for my own future reference. The OS I used for this guide was FreeBSD 5.4, but it stands to reason that it would work on others.

First, install subversion from the ports

[root@sam ~]# cd /usr/ports/devel/subversion
[root@sam /usr/ports/devel/subversion]# make install clean

Next, add a user for the subversion server to run under. I made mine “svn” at “/home/svn”. And I made a directory for the repository “/home/svn/rep”.

Next, setup your /etc/rc.conf so that the svn server will start on boot, or start at all. Append this to /etc/rc.conf

#svn server
svnserve_enable="YES"
#svnserve_flags="-d --listen-port=3690 --listen-host=0.0.0.0"
svnserve_flags="-d -r /home/svn/rep --listen-host=0.0.0.0"
svnserve_data="/home/svn/rep"
svnserve_user="svn"
svnserve_group="svn"

Start your svn server

[root@sam ~]# /usr/local/etc/rc.d/svnserve.sh start

Create the repository with svn

[root@sam ~]# svnadmin create /home/svn/rep

Explicitly set the password file, edit {repository}/conf/svnserve.conf and uncomment the line

password-db = passwd

and do whatever other edits to fine tune your repository.

Edit the password file to your liking, setting up a user with write access. The password file is {repository}/conf/passwd

And wha-la, presto :)



1 Comment »

  1. gravatar

    Teh Blarg » Subversion Administration and Usage Said,

    January 31, 2007 @ 12:25 pm

    [...] How to setup a Subversion server and repository on FreeBSDSomethin new goin downiPod… issues– George Bush –GMail — Google’s E-mail Games Playing WC3: FT (PC) [...]

RSS feed for comments on this post · TrackBack URI

Leave a Comment

blogtimes