How to install Jira Agile project management tools on CentOS 8

How to install Jira Agile project management tools on CentOS 8

Jira is an agile project management tool developed by Atlassian that can be used for issue tracking, project management and bug fixes. It provides a user-friendly web interface to help you track down issues. You can plan, track and manage all agile software development projects through a web browser. It can be easily integrated with Confluence, Bitbucket and other developer tools.

In this guide, I will explain how to install and configure Jira on CentOS 8.

prerequisites

  • Server 8 running CentOS.
  • A root password is configured on your server.

Install Java

Jira is written in Java. Therefore, you will need to install Java on your system. You can install it by running:

dnf install java-11-openjdk-devel -y

After installing Java, use the following command to verify the installed version of Java:

java -version
openjdk version "11.0.5" 2019-10-15 LTS
OpenJDK Runtime Environment 18.9 (build 11.0.5+10-LTS)
OpenJDK 64-Bit Server VM 18.9 (build 11.0.5+10-LTS, mixed mode, sharing)

Install MySQL server

At the time of writing this tutorial, Jira does not support MySQL version 8 and MariaDB servers. Therefore, you will need to install MySQL 5.7 on your system.

First, you need to disable the MySQL default AppStream repository from your system. You can disable it using:

dnf remove @mysql dnf module reset mysql dnf module disable mysql

Next, create a new repository file for MySQL 5.7 using the following command:

nano /etc/yum.repos.d/mysql-community.repo

Add the following lines:

[mysql57-community]
name=MySQL 5.7 Community Server
baseurl=http://repo.mysql.com/yum/mysql-5.7-community/el/7/$basearch/
enabled=1
gpgcheck=0

[mysql-connectors-community]
name=MySQL Connectors Community
baseurl=http://repo.mysql.com/yum/mysql-connectors-community/el/7/$basearch/
enabled=1
gpgcheck=0

[mysql-tools-community]
name=MySQL Tools Community
baseurl=http://repo.mysql.com/yum/mysql-tools-community/el/7/$basearch/
enabled=1
gpgcheck=0

Save and close the file when you are finished. Then, install MySQL 5.7 by running:

dnf --enablerepo=mysql57-community install mysql-community-server

After the installation is complete, start the MySQL service and use the following command to start it after the system restarts:

systemctl start mysqld systemctl enable mysqld

After installation, a temporary MySQL root password has been generated. You can use the following command to capture the password:

grep 'A temporary password' /var/log/mysqld.log |tail -1

You should get the following output:

2020-02-15T08:35:33.127395Z 1 [Note] A temporary password is generated for [email protected]: -)g2o+)feIw4

Remember this password as it will be needed during the MySQL root password reset process.

Next, it is recommended to reset the default MySQL root password. You can reset it using:

mysql_secure_installation

You will be asked to provide the default MySQL root password:

Enter password for user root: 

Provide the default MySQL root password and click Enter Set a new password as follows:

New password: 
Re-enter new password: 
Estimated strength of the password: 100 
Do you wish to continue with the password provided?(Press y|Y for Yes, any other key for No) : Y

Types of ÿ then press Enter Go ahead and follow these instructions:

Remove anonymous users? (Press y|Y for Yes, any other key for No) : Y
Disallow root login remotely? (Press y|Y for Yes, any other key for No) : Y
Remove test database and access to it? (Press y|Y for Yes, any other key for No) : Y
Reload privilege tables now? (Press y|Y for Yes, any other key for No) : Y

Configure MySQL database

Next, you need to adjust some MySQL settings. You can do this by editing the my.cnf file:

nano /etc/my.cnf

Add the following lines to [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

Save and close the file. Then, restart the MySQL service to implement the changes:

systemctl restart mysqld

Next, log in to the MySQL shell:

mysql -u root -p

Provide your root password and use the following command to create a database and user for Jira:

mysql> CREATE DATABASE jiradb CHARACTER SET utf8mb4 COLLATE utf8mb4_bin; mysql> CREATE USER 'jira'@'localhost' IDENTIFIED BY '[email protected]';

Next, grant the necessary privileges to jiradb using the following command:

mysql> GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,DROP,REFERENCES,ALTER,INDEX on jiradb.* TO 'jira'@'localhost' IDENTIFIED BY '[email protected]';

Next, refresh the privileges and exit from the MySQL Shell using:

mysql> FLUSH PRIVILEGES; mysql> EXIT;

Install and configure Jira

First, download the latest version of the Jira installation binary using the following command:

wget https://product-downloads.atlassian.com/software/jira/downloads/atlassian-jira-software-8.6.0-x64.bin -O atlassian-jira-software.bin

After downloading, provide execute permissions to the downloaded binary:

chmod +x atlassian-jira-software.bin

Next, run the following command to begin the installation:

./atlassian-jira-software.bin

You will be prompted for several questions, as shown below:

Unpacking JRE ...
Starting Installer ...

This will install Jira Software 8.6.0 on your computer.
OK [o, Enter], Cancel [c]

Press Enter start installation:

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]
1

Types of 1 And hit Enter Means installation:

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]

Hit Enter start installation:

Extracting files ...
                                                                           
Please wait a few moments while Jira Software is configured.

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

Press Enter Start the Jira service. When the installation is complete, you will get the following output:

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

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

Next, you will need to download and install the Java MySQL connector in Jira.

First, download the MySQL connector using the following command:

wget https://dev.mysql.com/get/Downloads/Connector-J/mysql-connector-java-8.0.18.zip

Next, extract the downloaded file using the following command and copy it to the Jira installation directory:

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

Next, restart the Jira service with the following command to implement the changes:

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

Next, you will need to configure the HTTP connector and define a proxy in Jira. You can configure it by editing the file /opt/atlassian/jira/conf/server.xml

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

Find the following lines:

"
                   maxThreads="150" minSpareThreads="25" connectionTimeout="20000" enableLookups="false"
                   maxHttpHeaderSize="8192" protocol="HTTP/1.1" useBodyEncodingForURI="true" redirectPort="8443"
                   acceptCount="100" disableUploadTimeout="true" bindOnInit="false"/>

And replace it with the following line:

        "
                   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"/>

Save and close the file, then restart the Jira service to apply the changes:

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

Configure Nginx as Jira’s reverse proxy

Jira runs on port 8080 by default. It is a good idea to configure Nginx as Jira’s reverse proxy. Therefore, you can access Jira using port 80.

First, install the Nginx web server using the following command:

dnf install nginx -y

After installing Nginx, start the Nginx service and enable it to start after the system reboots:

systemctl start nginx systemctl enable --now nginx

Next, create a new virtual host profile for Jira:

nano /etc/nginx/conf.d/jira.conf

Add the following lines:

server {
    listen 80;
    server_name jira.example.com;
    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 close the file when you are finished. Then, test Nginx for syntax errors using the following command:

nginx -t

You should get the following output:

nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful

Finally, restart the Jira and Nginx services to apply the changes:

/etc/init.d/jira stop /etc/init.d/jira start
systemctl nginx restart

Configure SELinux and firewall

Next, you will need to allow port 80 through the firewall. You can configure it with:

firewall-cmd --add-service=http --permanent firewall-cmd --reload

SELinux is enabled by default in CentOS 8. It is recommended to disable it as it may cause the Jira application to function properly.

You can disable SELinux by editing the / etc / selinux / config file:

nano /etc/selinux/config

Find the following line:

SELINUX=enforcing

And, replace it with the following line:

SELINUX=permissive

Save and close the file. Then, restart the system to apply the changes:

Visit Jira Dashboard

Open your web browser and enter the URL http://jira.example.com. You will be redirected to the following page:

Select ”I will set it myself“,then click next Button. You should see the following page:

Database settings

Select ”My own database“, Provide your database details and click next Button. You should see the following page:

Application attributes

Provide your application title, URL, and click next Button. You should see the following page:

Registration code

Provide your trial license key and click next Button. You should see the following page:

Administrator account

Provide your administrator account details and click next Button. You should see the following page:

E-mail notification

Click on Finish Button to complete the installation. You should see the language selection page:

Choose a language

Select the desired language and click carry on Button. You should see the following page:

Gila Account

Select your avatar and click next Button. You should see the following page:

Gila Dashboard

Click ”Create new project“Create your first project. You should see the following page:

Create a project in Gila

Select ”Scrum software development“,then click next Button. You should see the following page:

Scrum software development

Click on select Button to select your workflow. You should see the following page:

Project name and key

Provide your project name and key and click submit Button. You should see the Jira dashboard in the following pages:

Jira Project Dashboard

in conclusion

Congratulations! You have successfully installed and configured Jira on CentoS 8. You can now start exploring Jira to understand how it works. If you have any questions, feel free to ask me.

Sidebar