Here is how I setup this NAS to become svn server.
Create svn repos directory:
# apt-get update
# apt-get install subversion
# mkdir -p /var/svn/
# svnadmin create /var/svn/projectalpha
Add svn user and group:
# adduser --system --group --shell /usr/sbin/nologin --disabled-login svn
Set the appropriate ownership for the repository directory:
# chown -R svn.svn /var/svn
Add exisiting user to svn group so they will have access to the repo directory:
# useradd -G svn arsya
Now set up an ssh server, clients will connect to this machine using ssh:
Set up ssh server if does not exist yet:
# apt-get install openssh-server
Perform the following command to test via svn+ssh protocol:
$ svn co svn+ssh://username@hostname/var/svn/projectalpha
Now, what if you have your ssh server running on custom port? How can you tell your svn client to use it?
If you are using subversion, the one the you (apt-get) installed earlier, simply update your subversion configuration file in ~/.subversion/config:
[tunnels]
sshtunnel = ssh -p
If you are using tortoisesvn client in windows, then you need to go to TortoiseSVN->Settings->Network and set the SSH client to:
C:\Program Files\TortoiseSVN\bin\TortoisePlink.exe -P
Note that I do not need to install apache2 web server, since svn+ssh is enough for me to use. Also it would save some memory usage in this limited memory NAS.