Installing Jira on Ubuntu 16.04

Today I wanted to replace my paid membership of Jira + Confluence with server edition. For most online membership is the way to go but for me I only experiment and dabble with Jira to keep my skills up to date.

This will not be an all inclusive set of instructions, it will only be the instructions I needed to get the website up and running, with links of where I stole the information.

My setup is an AlphaRacks VPS Ubuntu Server 16.04, Jira X, MySQL X

  1. Install MySQL

sudo apt-get update 
sudo apt-get install mysql-server
systemctl enable mysql

This will update your current packages, install mysql and then enable mysql startup when rebooting OS.

https://support.rackspace.com/how-to/installing-mysql-server-on-ubuntu/

2. Install Jira user on Mysql


mysql -u root -p

Now that you are logged into MySql use the following:


mysql> create database jiradb character set utf8;
Query OK, 1 row affected (0.17 sec)

mysql> create user 'jira'@'localhost' identified by 'jira123';
Query OK, 0 rows affected (0.25 sec)

mysql> GRANT ALL Privileges ON jiradb.* TO 'jira'@'localhost' IDENTIFIED by 'jira123' with grant option;
Query OK, 0 rows affected (0.17 sec)

mysql> flush privileges;
Query OK, 0 rows affected (0.14 sec)

mysql> quit

This will create database jiradb and user jira and give privileges needed.

https://linoxide.com/linux-how-to/setup-jira-ubuntu-15-04/

I tried to run wget to download Jira on Ubuntu but I received a ‘403 Forbidden’ message. I tried supplying username and password and still had no success, so instead I downloaded on Windows 10 and then uploaded to Ubuntu VPS via WinSCP. Everything is so much easier in Windows! *hides*

https://www.atlassian.com/software/jira/download

3. Install Jira

Change director to where you uploaded the bin installation file.


chmod +x atlassian-jira-6.4.10-x64.bin
./atlassian-jira-6.4.10-x64.bin

This will give you permissions needed on the file and run the installation file. Personally I just hammered ‘enter’ button until it stopped asking my questions, using default installation and all of the default options.

https://linoxide.com/linux-how-to/setup-jira-ubuntu-15-04/

At this point I can navigate to my server url and see Jira setup page e.g. http://example.com:8080. I selected custom installation and database MySql 5.7+. When I tested my connection I get the following error: ‘
Could not find driver with class name: com.mysql.jdbc.Driver ‘.

4. Download and install ‘mysql-connector’

Download ‘mysql-connector’ jars and upload to Jira lib folder (default
/opt/atlassian/jira/lib). Something like this should work (I used WinSCP):


wget 'https://dev.mysql.com/downloads/file/?id=480091'
tar -zxvf *
Now restart the service to load connector:

sudo /etc/init.d/jira stop
sudo /etc/init.d/jira start

5. Configure MySql database

Next we will need to edit my.cnf to Jira’s liking. I made a backup since my Linux skills are mediocre. First run ‘rm -r *’…no wait run ‘vi my.cnf’ and edit the file accordingly (see link below).

my.cnf

...
[mysqld]
default-storage-engine=INNODB
character_set_server=utf8mb4
innodb_default_row_format=DYNAMIC
innodb_large_prefix=ON
innodb_file_format=Barracuda
innodb_log_file_size=2G
sql_mode = NO_AUTO_VALUE_ON_ZERO
[/mysqld]
...
Now restart Mysql:

/etc/init.d/mysql stop
/etc/init.d/mysql start

https://confluence.atlassian.com/adminjiraserver/connecting-jira-applications-to-mysql-5-7-966063305.html

6. Install Jira

I had issues with my collation. I think I need to adjust the above steps. It is an easy fix if I caused you grief. Let me know if you actually read this post and / or want me to improve it. I will gladly put more effort in if I know at least one person read my post.

Leave a Comment