, , ,

Here is the following steps for setup svn server on debian platform. The setup uses svn+ssh

$ apt-get update
$ apt-get install subversion
$ apt-get install libapache2-svn

The package libapache2-svn will install the subversion WebDAV apache module.

The following command used for creating repository

$ mkdir /var/repos/
$ svnadmin create /var/repos/project

Create user and group and assign to user to a group

$ adduser username1 //give the user name and next you'll get some options like password and others just give and continue
$ adduser username2
$  groupadd svngroup // just create  group for svn users
$ addgroup username1 svngroup // add the user username1 to groupsvn
$ addgroup username2 svngroup // add the user username2 to groupsvn

The repository directory need to get proper permission

$ chown -R :svngroup /var/repos/
$ chmod -R 775 /var/repos/

Make the ssh connectivity

$ mkdir ~/.ssh/
$ cd ~/.ssh/
$ ssh-keygen -t dsa
$ cat ~/.ssh/id_dsa.pub | ssh username1@yourdomain.com // or use id of your server

Need to use ssh agent to keep user authenticated,

$ ssh-agent
$ ssh-add
$ ssh username1@yourdoman.com

Done, you can import, checkout from her or you can do from your local machine. I used smartSVN to setup here is the link i’m using for connect

URL: svn+ssh://yourdomain.com/var/repos/project or
Username: username1
Password: mypassword

We can use svnserve by the following command

$  svnserve -d

this way I could connect to server with smartSVN client successfully and I could checkout, commit and doing everything what we svn supports.