Linux

How to install and configure JIRA on Linux

fimage2

JIRA is a proprietary and comprehensive software program developed by Atlassian that is primarily used for project management, problem tracking, and bug resolution. JIRA has an easy-to-use dashboard that allows you to keep track of issues. These concerns could include software flaws or defects, new features, or requirements, to name a few. Workflows are also included, allowing you to track job progress and pinpoint where an issue is occurring. Jira: What is Jira re-indexing. Other useful guides can be found here: how to install and configure Apache Cassandra on Linux Server and how to Install and Configure Elasticsearch on Linux also how to download, install and activate, and uninstall IBM SPSS Statistics and how to install, configure Prometheus for Monitoring on a Linux Server again, how to Install Terraform on Linux

Installation Prerequisites

  1. Ubuntu 18 and above
  2. Install the MariaDB database on your instance. Because JIRA needs a database to install all or most of the files, MariaDB will be useful.
  3. A user account with root privileges. To install JIRA on Ubuntu, simply follow the steps below.

Step 1: Install MariaDB Database Server

Because JIRA stores its data in MariaDB, we must install and setup it up for JIRA. To install the MariaDB Server, use the command below.

If you haven’t done so recently, refresh the package index on your server to install it: Install the mariadb-server package: sudo apt install mariadb-server -y

root@ubuntu:/home/rdgmh# sudo apt install mariadb-server -y
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  galera-3 gawk libaio1 libcgi-fast-perl libcgi-pm-perl
  libconfig-inifiles-perl libdbd-mysql-perl libdbi-perl libfcgi-perl
  libhtml-template-perl libreadline5 libsigsegv2 libsnappy1v5
  libterm-readkey-perl mariadb-client-10.3 mariadb-client-core-10.3
  mariadb-common mariadb-server-10.3 mariadb-server-core-10.3 socat

Make sure that the server is running

sudo systemctl start mariadb.service
sudo systemctl status mariadb.service
status-3
status

Step2: Configure a database for JIRA

Type this command to login

sudo mysql
mariadb
login

Create a database for JIRA

CREATE DATABASE techdirectarchivedb CHARACTER SET utf8mb4 COLLATE utf8mb4_bin;
CREATE USER 'techdirectarchiveuser'@'localhost' IDENTIFIED BY 'password';
GRANT ALL ON techdirectarchivedb.* TO 'techdirectarchiveuser'@'localhost' WITH GRANT OPTION;
FLUSH PRIVILEGES;
EXIT;
mariadb-database-1

edit the /etc/mysql/mariadb.conf.d/50-server.cnf file by typing:

sudo vim /etc/mysql/mariadb.conf.d/50-server.cnf

add the below data under [mysqld] section:

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

 close the file and exit then restart mariadb with the command:

sudo systemctl restart mariadb.service

Step 3: Install JIRA

Use wget command to get the latest version of Jira “wget https://www.atlassian.com/software/jira/downloads/binary/atlassian-jira-software-8.14.0-x64.bin

root@ubuntu:/home/rdgmh# wget https://www.atlassian.com/software/jira/downloads/binary/atlassian-jira-software-8.14.0-x64.bin
--2022-04-30 06:16:31--  https://www.atlassian.com/software/jira/downloads/binary/atlassian-jira-software-8.14.0-x64.bin
Resolving www.atlassian.com (www.atlassian.com)... 185.166.143.30, 185.166.143.32, 185.166.143.31
Connecting to www.atlassian.com (www.atlassian.com)|185.166.143.30|:443... connected.
HTTP request sent, awaiting response... 301 Moved Permanently
Location: https://product-downloads.atlassian.com/software/jira/downloads/atlassian-jira-software-8.14.0-x64.bin [following]
--2022-04-30 06:16:33--  https://product-downloads.atlassian.com/software/jira/downloads/atlassian-jira-software-8.14.0-x64.bin
Resolving product-downloads.atlassian.com (product-downloads.atlassian.com)... 13.227.150.190, 2600:9000:21f7:1800:1f:ab86:b4a:17e1, 2600:9000:21f7:f200:1f:ab86:b4a:17e1, ...
Connecting to product-downloads.atlassian.com (product-downloads.atlassian.com)|13.227.150.190|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 418775222 (399M) [application/octet-stream]
Saving to: ‘atlassian-jira-software-8.14.0-x64.bin’

atlassian-jira-soft 100%[==================>] 399.38M  1.63MB/s    in 19m 36s 

2022-04-30 06:36:12 (348 KB/s) - ‘atlassian-jira-software-8.14.0-x64.bin’ saved [418775222/418775222]

set the correct permissions for the downloaded file.

sudo chmod a+x atlassian-jira-software-8.14.0-x64.bin

Use this command to install the JIRA softwaresudo ./atlassian-jira-software-8.14.0-x64.bin“. Follow all the steps interactively responding with yes, enter or positively according to the instructions to fully install Jira

root@ubuntu:/home/rdgmh# sudo ./atlassian-jira-software-8.14.0-x64.bin
Unpacking JRE ...
Starting Installer ...

This will install Jira Software 8.14.0 on your computer.
OK [o, Enter], Cancel [c]
o
Click Next to continue, or Cancel to exit Setup.

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]


Select the folder where you would like Jira Software to be installed.
Where should Jira Software be installed?
[/opt/atlassian/jira]


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


Configure which ports Jira Software 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]
1

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

Details on where Jira Software will be installed and the settings that will be used.
Installation Directory: /opt/atlassian/jira 
Home Directory: /var/atlassian/application-data/jira 
HTTP Port: 8080 
RMI Port: 8005 
Install as service: Yes 
Install [i, Enter], Exit [e]
i

Extracting files ...
                                                                           

Please wait a few moments while Jira Software is configured.

Installation of Jira Software 8.14.0 is complete
Start Jira Software 8.14.0 now?
Yes [y, Enter], No [n]
y

Please wait a few moments while Jira Software starts up.
Launching Jira Software ...

Installation of Jira Software 8.14.0 is complete
Your installation of Jira Software 8.14.0 is now ready and can be accessed
via your browser.
Jira Software 8.14.0 can be accessed at http://localhost:8080
Finishing installation ...

Step 4: Configure JIRA 

To set up JIRA, you must first download the MySQL JDBC driver and then copy it to the Jira folder. You can do so by using the following command “wget https://dev.mysql.com/get/Downloads/Connector-J/mysql-connector-java-8.0.18.zip“.

root@ubuntu:/home/rdgmh# wget https://dev.mysql.com/get/Downloads/Connector-J/mysql-connector-java-8.0.18.zip
--2022-04-30 07:00:22--  https://dev.mysql.com/get/Downloads/Connector-J/mysql-connector-java-8.0.18.zip
Resolving dev.mysql.com (dev.mysql.com)... 137.254.60.11
Connecting to dev.mysql.com (dev.mysql.com)|137.254.60.11|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://cdn.mysql.com//archives/mysql-connector-java-8.0/mysql-connector-java-8.0.18.zip [following]
--2022-04-30 07:00:23--  https://cdn.mysql.com//archives/mysql-connector-java-8.0/mysql-connector-java-8.0.18.zip
Resolving cdn.mysql.com (cdn.mysql.com)... 92.122.253.200
Connecting to cdn.mysql.com (cdn.mysql.com)|92.122.253.200|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 4573467 (4.4M) [application/zip]
Saving to: ‘mysql-connector-java-8.0.18.zip’

mysql-connector-jav 100%[==================>]   4.36M   418KB/s    in 11s     

2022-04-30 07:00:35 (418 KB/s) - ‘mysql-connector-java-8.0.18.zip’ saved [4573467/4573467]

root@ubuntu:/home/rdgmh# 

Unzip the above downloaded file with the command:

sudo unzip mysql-connector-java-8.0.18.zip

Then, by entering, copy the MySQL connector.

sudo cp mysql-connector-java-8.0.18/mysql-connector-java-8.0.18.jar /opt/atlassian/jira/lib

Now, stop and restart Jira services by pressing

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

output

root@ubuntu:/home/rdgmh# sudo /etc/init.d/jira stop
executing using dedicated user

                  `sMMMMMMMMMMMMMM+
                     MMMMMMMMMMMMMM
                     :sdMMMMMMMMMMM
                             MMMMMM
          `sMMMMMMMMMMMMMM+  MMMMMM
             MMMMMMMMMMMMMM  +MMMMM
              :sMMMMMMMMMMM   MMMMM
                     MMMMMM    `UOJ
   `sMMMMMMMMMMMMM+  MMMMMM
     MMMMMMMMMMMMMM  +MMMMM
      :sdMMMMMMMMMM   MMMMM
             MMMMMM    `UOJ
             MMMMMM
             +MMMMM
              MMMMM
               `UOJ

      Atlassian Jira
      Version : 8.14.0
                  

If you encounter issues starting or stopping Jira, please see the Troubleshooting guide at https://docs.atlassian.com/jira/jadm-docs-0814/Troubleshooting+installation


Server startup logs are located in /opt/atlassian/jira/logs/catalina.out
Using CATALINA_BASE:   /opt/atlassian/jira
Using CATALINA_HOME:   /opt/atlassian/jira
Using CATALINA_TMPDIR: /opt/atlassian/jira/temp
Using JRE_HOME:        /opt/atlassian/jira/jre/
Using CLASSPATH:       /opt/atlassian/jira/bin/bootstrap.jar:/opt/atlassian/jira/bin/tomcat-juli.jar
Using CATALINA_PID:    /opt/atlassian/jira/work/catalina.pid
Tomcat stopped.
root@ubuntu:/home/rdgmh# sudo /etc/init.d/jira start

To run Jira in the foreground, start the server with start-jira.sh -fg
executing using dedicated user: jira

                  `sMMMMMMMMMMMMMM+
                     MMMMMMMMMMMMMM
                     :sdMMMMMMMMMMM
                             MMMMMM
          `sMMMMMMMMMMMMMM+  MMMMMM
             MMMMMMMMMMMMMM  +MMMMM
              :sMMMMMMMMMMM   MMMMM
                     MMMMMM    `UOJ
   `sMMMMMMMMMMMMM+  MMMMMM
     MMMMMMMMMMMMMM  +MMMMM
      :sdMMMMMMMMMM   MMMMM
             MMMMMM    `UOJ
             MMMMMM
             +MMMMM
              MMMMM
               `UOJ

      Atlassian Jira
      Version : 8.14.0
                  

If you encounter issues starting or stopping Jira, please see the Troubleshooting guide at https://docs.atlassian.com/jira/jadm-docs-0814/Troubleshooting+installation


Server startup logs are located in /opt/atlassian/jira/logs/catalina.out
Using CATALINA_BASE:   /opt/atlassian/jira
Using CATALINA_HOME:   /opt/atlassian/jira
Using CATALINA_TMPDIR: /opt/atlassian/jira/temp
Using JRE_HOME:        /opt/atlassian/jira/jre/
Using CLASSPATH:       /opt/atlassian/jira/bin/bootstrap.jar:/opt/atlassian/jira/bin/tomcat-juli.jar
Using CATALINA_PID:    /opt/atlassian/jira/work/catalina.pid
Tomcat started.
root@ubuntu:/home/rdgmh# 

Step 5: Configure Proxy For JIRA

Edit the /opt/atlassian/jira/conf/server.xml file to configure the proxy for JIRA using the command :

sudo nano /opt/atlassian/jira/conf/server.xml

And look for the given lines.

<Connector port="8080" relaxedPathChars="[]|" relaxedQueryChars="[]|{}^`"<>"
maxThreads="150" minSpareThreads="25" connectionTimeout="20000" enableLookups="false"
                    maxHttpHeaderSize="8192" protocol="HTTP/1.1" useBodyEncodingForURI="true" redirectPacceptCount="100" disableUploadTimeout="true" bindOnInit="false"/>
code

replace with

<Connector port="8080" relaxedPathChars="[]|" relaxedQueryChars="[]|{}^`"<>"
maxThreads="150" minSpareThreads="25" connectionTimeout="20000" enableLookups="false"
maxHttpHeaderSize="8192" protocol="HTTP/1.1" useBodyEncodingForURI="true" redirectPort="8443"
acceptCount="100" disableUploadTimeout="true" bindOnInit="false" scheme="http"
proxyName="jira.example.com" proxyPort="80"/>

apply the changes.

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

Step 6: Configure Nginx As Reverse Proxy for JIRA

configure the Nginx as a reverse proxy for JIRA. First install nginx by

sudo apt install nginx -y

edit the config file

sudo vim /etc/nginx/sites-available/jira.conf

past this in the config file

server {
     listen 8080;
     server_name localhost;
     location / {
         proxy_set_header X-Forwarded-Host $host;
         proxy_set_header X-Forwarded-Server $host;
         proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
         proxy_pass http://localhost:8080;
         client_max_body_size 10M;
     }
 }

Save and exit & link with the command :

sudo ln -s /etc/nginx/sites-available/jira.conf /etc/nginx/sites-enabled

Verify that Nginx is working with the command:

sudo nginx -t

output

root@ubuntu:/home/rdgmh# sudo nginx -t
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful
root@ubuntu:/home/rdgmh# 

Step 7: Access JIRA your Linux Machine

To use JIRA’s online interface, navigate to jira.example.com or localhost:8080. I’ll demonstrate on my localhost.

jira1

Summary

Jira is an agile project management software, we have been able to install and configure it on a Linux device by following the steps above.

Subscribe
Notify of
guest

0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x