Showing posts with label dlink. Show all posts
Showing posts with label dlink. Show all posts

Friday, September 16, 2011

Dlink DNS320 NAS as SVN Server

Continuing my previous post about Dlink DNS320 NAS, I would like to share about making this NAS as SVN Server. I am still amazed by this NAS and how handy and quite powerful it becomes, because I have Debian Squeeze installed and running on it. Once I have Debian Squeeze installed I could installed anything I need from the repositories. Please read my previous post on how to install it on this NAS.

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.

Thursday, September 15, 2011

DLink DNS320 NAS with Extended Services

DLink DNS320 NAS is quite awesome, because it is quite affordable and one can hack it to make it as even more useful than what it already is.

This NAS sports a Marvell Kirkwood processor with 128MB RAM, here is technical details of it:

CPU800 MHz Marvell 88F6281 (Kirkwood)
RAM128 MB
USB1 USB2.0 Port (front)
LANMarvell 88E1118R-NNC1


To get more info please go here.

Looking at that spec, one can get tempted to figure out a way to turn it into not just a Storage Server. Fortunately there is a way to extend the functionality by using fun_plug. Fun_plug makes installing other services so easy. Here and here contains more detail about setting it up in DNS320. Please install fun_plug (ffp) before installing Debian Squeeze. Make sure you use this ffp script for DNS320, otherwise you will receive errors.

For me it is not enough, since I know that there is a way to install Debian Squeeze in it and chroot it automagically. Now this is amazing, because you have a full blown debian linux distro running inside your NAS.
What you need is to download Debian Squeeze here. Then store it in the root of your nas, normally called Volume_1. Follow the readme inside the archive.

Once Debian Squeeze installed, you can install ntp daemon, web server, svn server, download manager, and other stuff. The only limitation is the size of RAM.

Oh, I need to inform you that installing fun_plug and Debian Squeeze is totally safe and reversible, because no ROM Flashing involved. So, what are you waiting for?!