Creating a SVN Repository

From PaskvilWiki
Jump to: navigation, search
  • install the subversion package, if not yet installed
  • create folder to hold your repositories (if it doesn't exist), and the repository:
mkdir /svn
svnadmin create /svn/repo
  • set the access rights by editing /svn/repo/conf/svnserve.conf file:
anon-access = none/read/write
auth-access = write
password-db = passwd
  • edit the /svn/repo/conf/passwd file, adding records for all users:
my_user_name = my_awesome_password
  • start svn server, and test it:
svnserve -d
svn co svn://my.domain.com/svn/repo .

Note: to be a bit safer, you might want to create user svn in svn group, then set

chown svn:svn -R /svn
chmod go-rwx -R /svn

and then run the svn server as the svn user:

sudo -u svn svnserve -d