Installing packages on Synology NAS through ipkg

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.

  1. 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.
  2. Create a shared folder through the administration panel (Privileges > Shared Folder). Call it anything you want. I called it plain 'svn'.
  3. 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.
  4. 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.
  5. 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)
  6. 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.

 

Thanks

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!

Be Sociable, Share!

4 comments

  1. n n says:

    hello patrick. could you please do a review on how to write code/ algorithm in split and merge segmentation.
    thank you.

  2. Patrick says:

    n n,

    I will have a look if I can find some time to do that :)

  3. n n says:

    okay. really appreciate it. thank you so much :)

  4. Chislon says:

    These instructions still worked on my DS212J. The only thing is that the the location of $HOME is /root instead of /home/root on my Synology. Thanks :)

Leave a Reply

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


+ 6 = seven