Recently I bought a Synology DS210j NAS. This is a linux-based NAS with an ARM processor. As this basically is a full linux server, there are some interesting options for geeks familiar with the command-line.
As I am a developer, I would like to be able to use version control for my projects. The NAS offers the possibility to install Subversion. The Synology wiki is excellent regarding instructions for installing the package manager (ipkg), Subversion. I prefer vim over vi. Vi is already installed on the NAS, but vim isn't. This can be easily installed through ipkg as well.
This post will not fully describe the steps of installing all the mentioned stuff (this is well documented at the wiki), but it will describe some items to notice when installing.
- First enable the command-line to be available. This can be done through the administration panel (go to Network Services > Terminal). You can choose between Telnet or SSH. (Source). Don't forget to enable the port (23 or 22 respectively) in the firewall so you can access the command-line.
- Create a shared folder through the administration panel (Privileges > Shared Folder). Call it anything you want. I called it plain 'svn'.
- Create an SVN user through the administration panel (Privileges > User) and give this user Read/write privileges through the Privileges setup tab. You will need this user later on.
- Although the NAS is linux-based, it doesn't have a package manager yet. Although it isn't necessary to have this, it makes life easier for you. You can install the ipkg bootstrap. After that you can use the ipkg package manager to install packages easily. For installing the right bootstrap, you first need to know what kind of processor is present in your NAS. You can check that here. After that, you can install the ipkg bootstrap by following the instructions at the bootstrap section on this page.
- After that, you can use the ipkg install command. To install vim, you can type 'ipkg install vim'. When using vim the arrow keys may not work. To fix this hit the Esc key and type :set term=builtin_ansi then hit enter. If you don’t want to have to keep entering that command each time you start vim then you can create a configuration file called .vimrc and place it in your home folder: vim /home/root/.vimrc Put the following two lines in the file:
:set term=builtin_ansi :set ruler
The :set ruler will enable the line and column number your cursor is on when editing a text file. (source)
- The above steps weren't all 100% clear to me. To install Subversion, proceed to follow this wiki entry beginning at the 'Installing Subversion Package' section. You've performed the first couple of steps already.
Upgrading PEAR to 1.9.4: out of memory
When I was trying to upgrade PEAR from version 1.9.1 to 1.9.4 I encountered two problems.
Two packages could not be found. This was not 100% clear from the error message (the packages could not be initialized, error on line 0). Fortunately ipkg could install the two packages (bzip and xslt) and the problem was solved.
When upgrading pear ('pear upgrade pear'), the installer used too much memory resources. As pear runs on PHP itself, this problem can be solved by opening the php ini file (location: /opt/etc/php.ini) and raising the default memory_limit (in my case memory_limit = 8M) to a higher value. After that PEAR upgrades just fine.
Thumbs up for Synology for not only creating a great (and stable) product, but also for the good documentation on a lot of subjects you can come up with!