Wednesday, August 31, 2005

Setting up Subversion on Ubuntu 5.04

I have just installed subversion on my ubuntu host on top of apache2. At the first step, install apache2 and subversion module including webdav.

# apt-get install apache2 libapache2-svn subversion
# apache2-ssl-certificate
# a2enmod ssl

Add following configuration in a file in /etc/apache2/site-enabled.

<Location /svn>
DAV svn
SVNPath /home/svn
AuthType Basic
AuthName "SVN"
AuthUserFile /home/svn/conf/svnpasswd
Require valid-user

Then create subversion repository and corresponding password file.

# svnadmin create /home/svn
# htpasswd2 -c /home/svn/conf/svnpasswd

Now you are ready to import repository layout.

$ mkdir tmpdir
$ cd tmpdir
$ mkdir projectA
$ mkdir projectA/trunk
$ mkdir projectA/branches
$ mkdir projectA/tags
$ mkdir projectB
$ mkdir projectB/trunk
$ mkdir projectB/branches
$ mkdir projectB/tags
$ svn import . --message 'Initial repository layout'

No comments: