Skip to main content

JIRA Installation with Postgresql

server apps issue tracking sql

Jira is a mature issue tracking system with advanced workflow features. While there are free options for maintaining bug and feature lists, JIRA is practically free: its parent company offers a non-crippled 10-user version for only $10 (and donates the proceeds to charity). JIRA also provides free licenses to some open source projects.

I use the the Netbeans development platform, which has a JIRA plugin that lets you manage your list within the IDE. The plugin officially supports the JIRA 3.x series, not the latest JIRA release 4. Therefore, this how-to addresses installation of JIRA 3.13 on a Debian 5.x (Lenny) server and assumes you’ve already downloaded JIRA . Aside from the repositories, the steps are the same in Ubuntu.

JIRA screenshot
JIRA is an issue tracker written in Java

###Get Java

Edit your repository list (/etc/apt/sources.list) to include the non-free repository:

deb lenny main contrib non-free

Install the Java6 Software Development Kit:

sudo apt-get install sun-java6-jdk

###Create Jira User and Database

sudo apt-get install postgresql

Add these lines to the end of /etc/profile (they tell Tomcat server where Java is installed):

export JAVA_HOME

Create a user with a home directory of /usr/local/jira:

sudo /usr/sbin/useradd --create-home --home-dir /usr/local/jira --shell /bin/bash jira

Become the jira user and verify that you set up the home directory properly:

paul@track:~$ sudo su - jira
jira@track:~$ pwd

So far, we have created a jira system user. Now we also need to create a jira postgresql user. We’ll create the account by becoming the postgresql user:

paul@track:~$ sudo su - postgres
postgres@track:~$ createuser -P jira
Enter password for new role:
Enter it again:
Shall the new role be a superuser? (y/n) n
Shall the new role be allowed to create databases? (y/n) y
Shall the new role be allowed to create more new roles? (y/n) n

Next, we need a postgresql database for JIRA:

paul@track:~$ sudo su - jira
jira@track:~$ createdb jira_313

###Install JIRA, JDBC, and Pre-Startup Configuration

We’re going to unpack JIRA in the jira user’s home directory we created earlier (/usr/local/jira), and create a symlink to shorten the path to it:

sudo su - jira
tar xvzf atlassian-jira-enterprise-3.13.3-standalone.tar.gz
ln -s atlassian-jira-enterprise-3.13.3-standalone jira-3.13

JIRA needs the JDBC driver to connect itself to the postgresql database. Download it from here, and place it in the lib subdirectory:

cd /usr/local/jira/jira-3.13/common/lib

Go to the conf subdirectory and edit the file server.xml. Replace the username, password, driverClassName and url lines and delete the lines defining minEvictableIdleTimeMillis and timeBetweenEvictionRunsMillis:

cd /usr/local/jira/jira-3.13/conf
jira@track:~/jira-3.13/conf$ diff server.xml.000 server.xml
<             username="sa"
<             password=""
<             driverClassName="org.hsqldb.jdbcDriver"
<             url="jdbc:hsqldb:${catalina.home}/database/jiradb"
<             minEvictableIdleTimeMillis="4000"
<             timeBetweenEvictionRunsMillis="5000"
>             username="jira"
>             password="jira"
>             driverClassName="org.postgresql.Driver"
>             url="jdbc:postgresql://localhost/jira_313"

Finally, go to the classes subdirectory and edit these two lines:

jira@track:~/jira-3.13/atlassian-jira/WEB-INF/classes$ diff entityengine.xml.000 entityengine.xml
<     <datasource name="defaultDS" field-type-name="hsql"
<       schema-name="PUBLIC"
>     <datasource name="defaultDS" field-type-name="postgres72"
>       schema-name="public"

Note that the field-type name is “postgres72”, even though we’re using the postgresql 8.4 driver.

###Start JIRA

jira@track:~/jira-3.13$ ./bin/

If problems, check the log for errors:

jira@track:~/jira-3.13$ tail logs/catalina.out

Login and begin setting up JIRA:

http://<your server IP address>:8080/



Dokuwiki Tutorial Part 2: Navigation and Appearance
server apps wiki
Part 1 of our Dokuwiki tutorial series covered installation and basic wiki page editing.
Dokuwiki Tutorial Part 1: Install and First Pages
server apps wiki
Dokuwiki is a wiki for small teams that’s easy to learn and a cinch to manage.
Dokuwiki: Small Footprint, Big Features
server apps wiki
Wikis are a valuable business tool.