debian squeeze - install svn server



1) instal svn, create user
apt-get install subversion
useradd -d /home/svn -m -s /bin/false svn
chmod 750 /home/svn

2) create startup script and config file
download startup script from attachment to /etc/init.d/
chown root:root /etc/init.d/svnserve
chmod 755 /etc/init.d/svnserve
update-rc.d svnserve defaults

echo 'OPTIONS="-d -r /home/svn"' > /etc/default/svnserve
/etc/init.d/svnserve restart

3) create repository
svnadmin create /home/svn/projekt

test - create directory
svn mkdir file:///home/svn/projekt/foo -m "Create test directory"
svn ls file:///home/svn/projekt

set permission in projekt/conf/svnserve.conf:
[general]
anon-access = none
auth-access = write
password-db = /home/svn/passwd
authz-db = /home/svn/authz
realm = server

/home/svn/authz:
[projekt:/]
myuser = rw
* =

/home/svn/passwd:
[users]
myuser = mypassword

4) test remote connection
allow TCP port 3690 on firewall
svn co svn://server/projekt

Attached files: svnserve

Tags: svn
Last update:
2012-04-06 15:08
Author:
Daniel
Revision:
1.8
Average rating:0 (0 Votes)

You can comment this FAQ

Chuck Norris has counted to infinity. Twice.