cc by-sa flurdy

Atlassian Jira on Ubuntu: Ubuntufying Jira

| More

Table of contents

  1. Why
  2. Install Jira
    1. Java
    2. Download
    3. Extract
    4. Jira user
    5. Jira home
  3. More FHSish
    1. Folders
    2. Logs
    3. Configurations
    4. Database
    5. Tomcat
  4. Init script
    1. Launch
    2. Monitor logs
  5. Jira's Port
  6. Apache proxy
  7. Backup
  8. Packaging
  9. Feedback
wont fix puta
kill bill devil smile
beast mode dumb people
prophet wtf
us | uk | eu


Install Jira as recommended

Launch Ubuntu (Follow flurdy ec2 docs for tips on using Ubuntu & ec2)

Install java

sudo aptitude install sun-java6-jdk; Accept Sun's license if prompted sudo update-alternatives --config java; Choose java-6-sun sudo vi /etc/profile.d/; JAVA_HOME=/usr/lib/jvm/java-6-sun
export JAVA_HOME
sudo chmod +x /etc/profile.d/

Download Jira

Either go via Atlassian's download pages or:


Extract and move Jira

tar xzf atlassian-jira-enterprise-4.0.1-standalone.tar.gz; sudo mkdir /opt/atlassian; sudo mv atlassian-jira-enterprise-4.0.1-standalone /opt/atlassian/jira-4.0.1 sudo ln -s /opt/atlassian/jira-4.0.1 /opt/atlassian/jira

Add Jira user

sudo /usr/sbin/useradd --create-home --home-dir     /usr/local/jira --shell /bin/bash jira; sudo chown -R jira:jira /opt/atlassian/jira-4.0.1

Edit configuration and enter Jira home

sudo vi /opt/atlassian/jira/atlassian-jira/WEB-INF/classes/; jira.home=/var/opt/atlassian/jira

If you are not interested in seperating the file locations etc, then this is all you have to do. But I prefer not to...

Making the install more FHSish

Create folders for configuration and data

sudo mkdir -p /etc/opt/atlassian/jira; sudo mkdir -p /var/opt/atlassian/jira; sudo chown jira:jira /etc/opt/atlassian/jira /var/opt/atlassian/jira

Move logs

sudo mv /opt/atlassian/jira/logs /var/log/jira; sudo ln -s /var/log/jira /opt/atlassian/jira/logs; sudo touch /var/log/jira/atlassian-jira.log; sudo chown jira:jira /var/log/jira/atlassian-jira.log; sudo ln -s /var/log/jira/atlassian-jira.log    /opt/atlassian/jira/atlassian-jira.log;

Link configurations

sudo ln -s /opt/atlassian/jira/atlassian-jira/WEB-INF/classes/\
sudo ln -s /opt/atlassian/jira/atlassian-jira/WEB-INF/classes/\
sudo mv /opt/atlassian/jira/conf /etc/opt/atlassian/jira/tomcat; sudo ln -s /etc/opt/atlassian/jira/tomcat    /opt/atlassian/jira/conf

Move the database

sudo mkdir -p /var/lib/hsqldb/jira; sudo chown jira:jira /var/lib/hsqldb/jira; sudo ln -s /var/lib/hsqldb/jira     /opt/atlassian/jira/database

Move non static tomcat files

sudo mkdir /var/opt/atlassian/jira-tomcat; sudo mv /opt/atlassian/jira/work /var/opt/atlassian/jira-tomcat/; sudo mv /opt/atlassian/jira/temp /var/opt/atlassian/jira-tomcat/; sudo ln -s /var/opt/atlassian/jira-tomcat/work /opt/atlassian/jira/; sudo ln -s /var/opt/atlassian/jira-tomcat/temp /opt/atlassian/jira/

Init script

Follow Atlassian's init.d script instructions by.

Copy their init.d script to /tmp/ Then modify it:

vi /tmp/ BIN=/opt/atlassian/jira/bin sudo mv /tmp/ /etc/init.d/jira sudo chmod 751 /etc/init.d/jira sudo chown root:root /etc/init.d/jira sudo update-rc.d jira defaults

(Ignore the LSB warnings...)

Launch Jira

sudo /opt/atlassian/jira/bin/ sudo /etc/init.d/jira start

First launch may take a long time as it needs to create database, configure plugins etc.

Monitor logs

If empty or errors then somethings is not right...

tail -f /var/log/jira/atlassian-jira.log tail -f /var/log/jira/catalina.out

Modifying Jira's port

Follow Atlassian's changing Jira's port page.

Apache proxy

Using elements from my own tomcat+apache howto and Atlassian's integrating Apache page.


If you want to backup Jira, Atlassian provides several tips in their wiki on exporting Jira data etc.
However to backup just the files from this install you can tar up these:

sudo /etc/init.d/jira stop; sudo /opt/atlassian/jira/bin/; sudo tar cf jira.2010-01-23.1.tar /etc/opt/atlassian/jira; sudo tar rf jira.2010-01-23.1.tar /var/opt/atlassian/jira; sudo tar rf jira.2010-01-23.1.tar /var/opt/atlassian/jira-tomcat; sudo tar rf jira.2010-01-23.1.tar /var/lib/hsqldb/jira; sudo tar rf jira.2010-01-23.1.tar /var/log/jira; sudo gzip jira.2010-01-23.1.tar; sudo /opt/atlassian/jira/bin/; sudo /etc/init.d/jira start


I have made a very crude attempt on a script to do all this. Do not use it in a production environment, as it does no checking, assumes installation exactly like mine etc.

I have not packed this up in a .deb package. But perhaps in the future if there is a need.

But the best would be perhaps if Atlassian made a proper .deb package instead?!