JIRA Installation on Synology NAS – Part 3 – Installation

Introduction

Now that we’ve got the system prepped for the installation, it’s time to start it!

First, we have to download JIRA. The only way to get the older versions is to look at Atlassian’s JIRA Downloads Archive. Remember, 5.2.11 is the latest version that is able to be installed on the Synology products with DSM 4.3 or lower. DSM is only a 32-bit operating system, so make sure to download the 32-bit version of JIRA. Also, to make everything easy, we’re going to use Atlassian’s linux installer – after all, that’s why we did all this prep! To save some time, here’s the link for the download that I used: http://www.atlassian.com/software/jira/downloads/binary/atlassian-jira-5.2.11-x32.bin

Modifications

Once you’ve got this downloaded, we have to edit the installation script a little bit. Apparently, even though [shell]gunzip[/shell] is installed on DSM, the script doesn’t find it. It executes it just fine, but can’t find the path to it for testing if it’s there. So, we’ll just remove the test by removing these lines from the [shell]*.bin[/shell] you just downloaded:

[shell] gunzip -V  > /dev/null 2>&1
if [ “$?” -ne “0” ]; then
echo “Sorry, but I could not find gunzip in path. Aborting.”
exit 1
fi
[/shell]

Installation

Install by executing the [shell]*.bin[/shell]. This will guide you through the automated installation script. I installed everything in [raw]/opt[/raw] or a subdirectory thereof so that the installation was backed up on the redundant volumes. The default installation directory is already in [raw]/opt[/raw] ([raw]/opt/atlassian/jira[/raw]), so I just hit enter on that option. Then it will ask you about where to locate JIRA’s home directory. To keep this in the [raw]/opt[/raw] directory, I appended /opt to it. So, [raw]/var/atlassian/application-data/jira[/raw] became [raw]/opt/var/atlassian/application-data/jira[/raw]. Finally, I used the default ports and installed it as a service.

Once everything succeeds, you’ll see this:

[raw] Launching JIRA …
Installation of JIRA 5.2.11 is complete
Your installation of JIRA 5.2.11 is now ready and can be accessed via your browser.
JIRA 5.2.11 can be accessed at http://localhost:8080
Finishing installation …
[/raw]

JIRA User

However, don’t believe it, it’s probably not going to work. The installation is supposed to create a specific “jira” user account on the system. However, since DSM is all sorts of special, it might not be successful. Check it by trying to start it yourself:

[shell] cd /opt/atlassian/jira/bin/
./start-jira.sh
[/shell]

If it responds with,

[raw] executing using dedicated user
su: user jira does not exist
[/raw]

then it didn’t work. To check after the installation use this command to list all the users:

[shell] cat /etc/passwd |grep “/home” |cut -d: –f1
[/shell]

If the “jira” user was not created, you’ll have to create it with the Synology web interface.

Now, reset the installation by removing JIRA from the folders you installed it to (the installation directory and the home directory), and start the installation over again.

Permissions

Now that JIRA has installed successfully, you’ll have to make sure that “jira” has permissions to the following directories:

[raw] /opt/atlassian/jira/logs
/opt/atlassian/jira/work
/opt/atlassian/jira/temp
/opt/var/atlassian/application-data/jira
[/raw]

To make everything simple and remove any more barriers, I just gave “jira” all permissions to these directories. This is obviously a little unsafe, so use with caution. I did this to all the directories listed above:

[shell] chmod –R a+rwX
[/shell]

Restart

Now that that’s done and dusted, you have to restart JIRA, since it would have started after the installation:

[shell] /opt/atlassian/jira/bin/stop-jira.sh
/opt/atlassian/jira/bin/start-jira.sh
[/shell]

Once the start script finishes, the screen should look like this:

image[1]

Success!

I double-checked that this started appropriately by going to the Synology Resource Manager and watching the processes. When stopped, there should be no java processes running. Once started, they should start appearing. When they all settle down, I found that this was the time to try accessing it at http://<diskstationIP>:8080. This is where I was finally rewarded with the task bar changing to this address: http://diskstation:8080/secure/SetupDatabase!default.jspa and this webpage showing up after a minute or so wait (watching the java processes work on my other screen).

image_20140123-044617_1[1]image10[1]

JIRA doesn’t seem to be too much of a memory hog, as it only takes up about 400MB on my NAS when running after configuration. This will be a bit much for the stock 1GB of RAM installed, so I would recommend doing what I did and install another stick to expand it to 3GB.

Now just follow the on-screen prompts and Atlassian’s directions and wiki. You’ll need only a modest amount of experience to make sure you setup the databases correctly. Using phpMyAdmin makes it a snap, though.

3 thoughts on “JIRA Installation on Synology NAS – Part 3 – Installation

  1. java.io.IOException: Cannot run program “/opt/atlassian/jira/bin/setup_user.sh” (in directory “/opt/atlassian/jira/.”): error=13, Permission denied
    Happens while trying to install Jira

    1. Keep in mind that this guide was for DSM 4.3. I now only have DSM 5.2 and am using higher versions of JIRA, so I can’t really investigate further.

      If I remember correctly, though, the setup_user.sh file will probably fail because it tries to create a jira user through standard linux commands and Synology doesn’t have those. However, having a permissions error leads me to believe it’s something else. Did the rest of the installation go fine? What was the result of the installer? Did it fail after that error?

Leave a Reply

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