JIRA Installation on Synology NAS – Part 2 – Preparation

After figuring out the Java limitations involved in running things on Synology’s DSM, I finally figured out a way that got JIRA installed on the NAS. I do not warranty this tutorial whatsoever, and there are some dangerous choices that were made. Any good linux user will spot them and hopefully be able to clean them up. If someone tries it with modifications, please post a comment and let me know what you changed.

Anyway, first we must prep the Diskstation for work. The first step I took was to install the Java Manager package onto the NAS. I don’t believe this is necessary, as it installs Java to a location that JIRA will not be aware of (and all Atlassian installer packages should include Java).

The first step that is definitely required is to install phpMyAdmin, as it allows access to manage the NAS’s MySQL server that’s built-in. DSM uses this server for its own internal uses, so it’s a little lightweight but we can piggy-back on this for this small team installation.

Next, enable the command line interface to the NAS; the entire installation will be done through this. I did every step as root, though it should all be possible to do as the admin user. Both log into the CLI with the same password.

Synology’s DSM only includes a modified ash shell for its sole CLI; however, Atlassian’s products are reliant on the more common bash shell. All of Atlassian’s included installation scripts were scripted for bash. So, we’ll need to install it. First, however, the NAS needs to be “bootstrapped.”  I found a good writeup on how to do this here, so I’ll save the longwinded discussion on how to do that.

The same author also wrote about how to install and make bash your default shell. However, there were a few unnecessary and dangerous steps, so I figured I’d pare it down for you. First, install bash using,

ipkg install bash

Now, to make sure we can use bash by default without a problem, change the normal shell to bash from ash. Edit your .profile and append these lines:

if [ -x /opt/bin/bash ]; then
exec /opt/bin/bash

Now, bash should be your default shell, but you didn’t endanger your system to do it. Log out and log back into SSH, and you should now be logged into a bash shell.

There’s one small hiccup, though. Notice how ipkg installed bash to /opt/bin/bash rather than the standard /bin/bash? Well, that’s because Synology organizes DSM a little differently to make sure all non-DSM stuff is stored in a location that’s on the redundant main volume, not within the small 2GB partition that stores DSM itself.

In order to compensate for that in the future so other scripts and such don’t have to be modified in order to find bash correctly, create a symbolic link between the two locations:

ln -s /opt/bin/bash /bin/bash

This way you’ll eliminate many future headaches. Now, onto the installation!

Leave a Reply

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