3 minutes SVN server

EnglishLinux

Install a debian server

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

svnadmin create /srv/SVN/repo

Assign access

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

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

Done !

To connect, checkout :

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.