3 minutes SVN server

EnglishLinux

Install a debian server

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
apt-get update
apt-get install -y subversion
mkdir /srv/SVN
 
cat > /etc/init.d/svnserve << "EOF"
#!/bin/sh
 
do_start () {
    svnserve -d -r /srv/SVN --pid-file /var/run/svnserve.pid
}
do_stop () {
    start-stop-daemon --stop --quiet --pidfile /var/run/svnserve.pid
}
 
 
case "$1" in
    start)
        do_start
        ;;
    stop)
        do_stop
        exit $?
        ;;
    restart)
        do_stop
        sleep 1s
        do_start
        ;;
    reload|force-reload)
        echo "Error: argument '$1' not supported" >&2
        exit 3
        ;;
    *)
        echo "Usage: $0 start|stop|restart" >&2
        exit 3
        ;;
esac
EOF
 
 
chmod +x /etc/init.d/svnserve
update-rc.d svnserve defaults

Create a repo

1
svnadmin create /srv/SVN/repo

Assign access

1
2
3
4
vi /srv/SVN/repo/conf/svnserve.conf
anon-access = none
auth-access = write
password-db = passwd
1
2
3
vi /srv/SVN/repo/conf/passwd
[users]
login = password

Now start server : /etc/init.d/svnserve start

Done !

To connect, checkout :

1
svn://<ip adresse>/repo

The end

Previous
Scala – Scalatra – Salat – MongoDB : test drive
Next
Fast API development using Scalatra and squeryl

Leave a comment

Your email address will not be published. Required fields are marked *

Time limit is exhausted. Please reload the CAPTCHA.