Installing Jira on Ubuntu 10.04 Lucid

This January I decided to finally make the move to put Jira on my Rackspacecloud hosting. It took a bit of searching so I decided to make a step by step guide.

Sun Java 1.6

From a fresh install of 10.04 we need to install a few things to make Jira run nicely

nano /etc/apt/sources.list

add the line
deb http://archive.canonical.com/ lucid partner
Do a quick update and upgrade of the sources and any basic packages you have on the system
 apt-get update 
 apt-get upgrade
Then install Sun Java from the new source and check it is the right version
apt-get install sun-java6-jdk
java -version
java version "1.6.0_26" 
Java(TM) SE Runtime Environment (build 1.6.0_26-b03) 
Java HotSpot(TM) 64-Bit Server VM (build 20.1-b02, mixed mode) 
If you have a different Java showing up here you may need to use

update-alternatives --config java

Once you have the Sun Java appearing in the java -version result you can move on

nano /etc/profile

Add the following

JAVA_HOME=/usr/lib/jvm/java-6-sun
export JAVA_HOME

MySQL

 

Now install the MySQL instance for Jira to use

apt-get install mysql-server mysql-client

mysql -u root -p

Then enter the password you setup for the root account
Now we need to create the user and database on MySQL for the Jira installation 

CREATE USER 'jira_db'@'localhost' IDENTIFIED BY  '__PASSWORD__';
 GRANT USAGE ON * . * TO  'jira_db'@'localhost' IDENTIFIED BY  '__PASSWORD__' WITH MAX_QUERIES_PER_HOUR 0 MAX_CONNECTIONS_PER_HOUR 0 MAX_UPDATES_PER_HOUR 0 MAX_USER_CONNECTIONS 0 ;
 CREATE DATABASE IF NOT EXISTS  `jira_db` ;
 GRANT ALL PRIVILEGES ON  `jira_db` . * TO  'jira_db'@'localhost';

 

Jira

 

Now we are ready to install Jira onto the machine
Following the steps from http://confluence.atlassian.com/display/JIRA/Installing+JIRA+on+Linux
Download the appropriate JIRA 'Linux 64-bit / 32-bit Installer' (.bin) file from the JIRA EAP Download page.

wget atlassian-jira-X.Y.bin
chmod a+x atlassian-jira-X.Y.bin
./atlassian-jira-X.Y.bin

Follow the on-screen install instructions. (I used the defaults for everything)

When you are done you should see a message like:

JIRA 4..4.4 can be accessed at http://localhost:8080
 Finishing installation ... 

When you open the website on port 8080 you should be able to figure out how to set up the MySQL

With Jira 5 you can add Gmail as your SMTP using apps (not available in the 4.4.4 version unfortuantely)