How to install and configure JIRA in redhat/centos 6.x

Posted by Md. Mahidul Hasan on 4:05 AM with 2 comments

How to install and configure JIRA

Concept:
JIRA is a proprietary issue tracking product, used for bug tracking, issue tracking and project management which is developed by Atlassian. We can install JIRA three different ways like using .bin, .war or .tar.gz files. Here I will show you how to install jira using .bin file. It's very easy and simple. Follow the below steps and total installation will be complete within a few minutes.

Install mysql:
[root@db1 ~]# yum -y install mysqld

Or, download the following rpm packages and install from it.
[root@db1 ~]# yum remove mysql-libs perl-DBD-MySQL
[root@db1 ~]# yum install libaio perl-DBI
[root@db1 ~]# rpm -ivh /Packages/mysql-5.5.27-packages/mysql-libs-5.5.27-11.el6.art.x86_64.rpm
[root@db1 ~]# rpm -ivh /Packages/mysql-5.5.27-packages/mysql-5.5.27-11.el6.art.x86_64.rpm
[root@db1 ~]# rpm -ivh /Packages/mysql-5.5.27-packages/mysqlclient16-5.1.59-1.el6.art.x86_64.rpm
[root@db1 ~]# rpm -ivh /Packages/mysql-5.5.27-packages/perl-DBD-MySQL-4.022-1.el6.rfx.x86_64.rpm
[root@db1 ~]# rpm -ivh /Packages/mysql-5.5.27-packages/mysql-server-5.5.27-11.el6.art.x86_64.rpm
[root@db1 ~]# yum install crontabs 
[root@db1 ~]# service mysqld restart
[root@db1 ~]# chkconfig mysqld on

Create a database for jira and give proper permission:
[root@db1 ~]# mysqladmin -u root password your_root_password
[root@db1 ~]# mysql -u root -p
mysql> CREATE DATABASE jiradb CHARACTER SET utf8 COLLATE utf8_bin;
mysql> GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,DROP,ALTER,INDEX on jiradb.* TO 'jira'@'localhost' IDENTIFIED BY 'jira_db_password';
mysql> flush privileges;
mysql> SHOW GRANTS FOR 'jira'@'localhost';
mysql> exit;

Install Jira:
Download atlassian-jira-6.2.2-x64.bin (32/64 bit) from https://www.atlassian.com/software/jira/download. And install as below-
[root@db1 JIRA_Packages]# ./atlassian-jira-6.2.2-x64.bin
Unpacking JRE ...
Starting Installer ...
Apr 08, 2014 10:09:06 AM java.util.prefs.FileSystemPreferences$1 run
INFO: Created user preferences directory.
Apr 08, 2014 10:09:06 AM java.util.prefs.FileSystemPreferences$2 run
INFO: Created system preferences directory in java.home.

This will install JIRA 6.2.2 on your computer.
OK [o, Enter], Cancel [c]

Choose the appropriate installation or upgrade option.
Please choose one of the following:
Express Install (use default settings) [1], Custom Install (recommended for advanced users) [2, Enter], Upgrade an existing JIRA installation [3]
2

Where should JIRA 6.2.2 be installed?
[/opt/atlassian/jira]

Default location for JIRA data
[/var/atlassian/application-data/jira]

Configure which ports JIRA will use.
JIRA requires two TCP ports that are not being used by any other
applications on this machine. The HTTP port is where you will access JIRA
through your browser. The Control port is used to Startup and Shutdown JIRA.
Use default ports (HTTP: 8080, Control: 8005) - Recommended [1, Enter], Set custom value for HTTP and Control ports [2]
2
HTTP Port Number
[8080]
9080
Control Port Number
[8005]
9005

JIRA can be run in the background.
You may choose to run JIRA as a service, which means it will start
automatically whenever the computer restarts.
Install JIRA as Service?
Yes [y, Enter], No [n]
y

Extracting files ...
Please wait a few moments while JIRA starts up.
Launching JIRA ...
Installation of JIRA 6.2.2 is complete
Your installation of JIRA 6.2.2 is now ready and can be accessed via your
browser.
JIRA 6.2.2 can be accessed at http://localhost:9080
Finishing installation ...


Note: Here, we have used 9080 and 9005 port cause other applications also use the default 8080 port.

Install mysql driver for Jira:
Download mysql driver for JIRA from http://dev.mysql.com/downloads/connector/j and Select Connector/J 5.1.30: Platfrom Independent.
[root@db1 ~]# wget http://cdn.mysql.com/Downloads/Connector-J/mysql-connector-java-5.1.30.tar.gz
[root@db1 ~]# tar -zxvf mysql-connector-java-5.1.30.tar.gz
[root@db1 ~]# cp -pfrv mysql-connector-java-5.1.30/mysql-connector-java-5.1.30-bin.jar /opt/atlassian/jira/lib
[root@db1 ~]# service mysqld restart
[root@db1 ~]# service jira stop
[root@db1 ~]# service jira start

Configure and setup your license through jira web interface:
Now, open your our web browser and follow the below settings:
http://192.168.1.198:9080

Server Language: English (United States)
Connection: My Own Database (recommended for production environments)
Database Type: localhost
Port: 3306
Database: jiradb
Username: jira
Password: jira_db_password

Rest of procedure is piece of cake. Complete it and your jira server is ready to use. Hope this article will help you.