How to install redmine on Synology diskstation

2011-10-12 at 23:45:23 | categories: tips, synology


I like redmine and use it for many project - private and professional as well.
Some time ago I became a happy owner of Synology DS111 so one of the next steps was to install redmine on it :-).

I did this few months ago, so I hope I remember all steps well ;-)

Redmine on the Synology DS111

Perhaps there is an easier way to do it, however I did it as follows:

  • Install gcc on the unit using ipkg (in order to compile ruby) - please follow instructions on Synology page how to install ipkg and use it for installing packages.
  • Install openssl and openssl-dev using ipkg - it will be needed for ruby
  • Get ruby v1.8.7 sources, edit ext/Setup file enabling: digest/md5, digest/sha1, digest/sha2, openssl, socket, thread. And compile it (./configure --prefix=/opt; make; make install). This may take some time, so relax :-).
  • Get rubygems v1.8.2 and install it.
  • Use gem command to install other ruby stuff: rake v0.8.7, ruby-mysql v2.9.4 and rails v2.3.5 which will install even more things. On my system gem list shows this: actionmailer (2.3.5) actionpack (2.3.5) activerecord (2.3.5) activeresource (2.3.5) activesupport (2.3.5) i18n (0.4.2) rack (1.0.1) rails (2.3.5) rake (0.8.7) ruby-mysql (2.9.4)
  • Using your diskstation's web interface create a new user - redmine.
  • Using phpmysqladmin create a new mysql database for the redmine and an user who can access it.
  • Fetch redmine v1.1.3 and follow its instruction to install, providing user and password for accessing DB in config/database.yml, etc.
  • Test it using its server (ruby script/server -e production) and if it works - great! If it does not please check the above steps - maybe something went wrong.
  • If the test went well - make a script for automatic starting. I'm using something like this placed in /opt/etc/init.d/S85redmine :
#! /bin/sh

export LD_LIBRARY_PATH=/usr/lib:/lib/:/opt/lib
export PATH=/opt/sbin:/opt/bin:/sbin:/bin:/usr/sbin:/usr/bin

case "$1" in
        echo -n "Starting redmine server: "
        if [ ! -d $REDMINE ]
            echo "Directory $REDMINE does not exist"
            exit 1

        su redmine -c "cd $REDMINE && ./script/server -d -e production"
        echo "done."
        echo -n "Stopping redmine : "
        killall -SIGINT ruby
        echo "done."
        echo -n "Restarting redmine server: "
        $0 stop
    sleep 2
        $0 start
        echo "done."
        echo "Usage: $0 {start|stop|restart}"
        exit 1

exit 0


As you can see it is not a very efficient way - since it uses redmine's own web server which should actually be used for development only. However it works great for my needs so I'm happy with this solution.

I hope this description can be helpful for some other redmine AND synology lovers ;-)