Setup a SVN server in minutes

Posted by admin on May 15th, 2009 filed in Subversion

Here are the steps

1. Create a repository

# mkdir /svn_repos
# cd /svn_repos
# mkdir -p / //trunk //branch //tags
# svnadmin create /svn_repos/ # svn import -m “Repo Creation” / file:///svn_repos/

2. Securing the SVN repository

# vim /svn_repos/ /conf/svnserve.conf

Append the lines to the end of the file,

anon-access = none
auth-access = write
password-db = passwd

Setting up Authentication

# vim /svn_repos/ /conf/passwd
# add users in the format : user = password
username = password

*Note the password is in plaintext. Please make sure that you setup a strong password

3. Host the SVN repository on the web

# svnserve -d

4. Accessing the Repository from a remote location

svn://hostname/svn_repos/

Pre-Requisites
* Port 3690 must be open
* You must provide the complete url to access the svn repository. For example, if the domain name is mysvnrepository.com and the project name is /mysuperproject the valid svn url will be
svn://mysvnrepository.com/mysuperproject

Note: “/” in front of “mysuperproject” that is the physical path on the unix file system. if the svn repo is created at “/svn/mynewrepo” then the valid url will be

svn://mysvnrepository.com/svn/mynewrepo

-Admin

Leave a Comment