debian jessie, notes on setting up subversion

Notes on setting up a subversion server on debian Jessie

Install subversion
# apt-get install subversion


Install the apache HTTP daemon
# apt-get install apache2


Install the WebDAV apache2 module
# apt-get install libapache2-svn


Create directories for the repositories
# mkdir -p /srv/svn/dev
# mkdir /srv/svn/doc


Create the dev and doc repositories
# svnadmin create --fs-type fsfs /srv/svn/dev
# svnadmin create --fs-type fsfs /srv/svn/doc


Add an svn group
# groupadd svnchmod -R 770 /srv/svn/
# addgroup someuser svn
# addgroup someotheruser svn


# chown -R www-data:svn /srv/svn
# chmod -R 770 /srv/svn/ 


Commit on subversion server over SSH
$ mkdir test
$ echo "testing svn over ssh" > test/testing.txt
$ svn import -m "testing testing 123" test/ svn+ssh://192.168.101.11/srv/svn/doc
Adding         test/testing.txt

Committed revision 1.



Check on the server
# svnlook tree /srv/svn/doc/
/
 testing.txt



Configure WebDAV for subversion
# a2enmod dav_svn
# a2enmod dav_fs
# service apache2 restart


Webauth for someuser
# htpasswd -c /etc/subversion/dav_svn.passwd someuser


Configure a repository over WebDAV in /etc/apache2/mods-available/dav_svn.conf e.g.
<Location /svn>
  DAV svn
  SVNParentPath /srv/svn
  SVNListParentPath On
  AuthType Basic
  AuthName "yetAnother Subversion Repository"
  AuthUserFile /etc/subversion/dav_svn.passwd
  Require valid-user
</Location>


restart apache
# /etc/init.d/apache2 restart
rechown /srv/svn, the previous test may brake webdav
# chown -R www-data:svn /srv/svn


Test svn over WebDAV
$ svn co --username=someuser http://192.168.101.11/svn/doc
Authentication realm:  Incelligent Doc Repository
Password for 'someuser': *******

A    doc/testing.txt
Checked out revision 1.
$ echo "testing webdav" > doc/testing-webdav.txt
$ svn ci -m "testing webdav transport"






notes on setting up subversion