3

How To Install Jira on CentOS 8 / RHEL 8 Linux

 2 years ago
source link: https://computingforgeeks.com/how-to-install-jira-on-centos-rhel-8-linux/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

JIRA is a project management tool developed by Atlassian. It is also used for issue tracking and bug tracking related to your software development and other Projects. This guide will walk you through the installation Jira on CentOS 8 / RHEL 8 Linux.

Step 1: Install Java

Jira requires Java installed in your CentOS 8 / RHEL 8 machine for it to run. Checkout our guide on how to install Java in a CentOS / RHEL 8 system:

Confirm installation by checking the Java version:

$ 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)

Step 2: Install MySQL 5.7 database Server

As of this writing, Jira doesn’t work with MySQL 8 database server, install MySQL 5.7 using our guide below.

Edit the MySQL 5.7 configuration server section to add below lines.

$ sudo vi /etc/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

Restart mysqld service:

sudo systemctl restart mysqld

Once the database server is installed, login as root user and create database and user for Jira:

$ mysql -u root -p
CREATE DATABASE jira CHARACTER SET utf8mb4 COLLATE utf8mb4_bin;
CREATE USER 'jira'@'localhost' IDENTIFIED BY 'Str0ngDBP@ssw%rd';
GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,DROP,REFERENCES,ALTER,INDEX on jira.* TO 'jira'@'localhost' IDENTIFIED BY 'Str0ngDBP@ssw%rd';
FLUSH PRIVILEGES;
QUIT;

Step 3: Download and Install JIRA on CentOS 8 / RHEL 8

We have install Java and a database server, the next action is to download JIRA’s binary file. Check the latest version on the Jira Downloads page.

sudo yum -y install wget
wget https://product-downloads.atlassian.com/software/jira/downloads/atlassian-jira-software-8.19.1-x64.bin -O atlassian-jira-software.bin

Give the file execution bit:

chmod +x atlassian-jira-software.bin

Now start the installer:

sudo ./atlassian-jira-software.bin

Press <Enter> key to start Jira setup.

Unpacking JRE ...
Starting Installer ...

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

Choose [1] to use express installation settings:

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

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 

Type i key to start installation.

Install [i, Enter], Exit [e]
i
Extracting files ...
Please wait a few moments while Jira Software is configured.
Installation of Jira Software 8.19.1 is complete

Accept to start Jira services.

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

Install Java MySQL connector:

wget https://dev.mysql.com/get/Downloads/Connector-J/mysql-connector-java-8.0.18.zip
unzip mysql-connector-java-8.0.18.zip
sudo cp mysql-connector-java-8.0.18/mysql-connector-java-8.0.18.jar /opt/atlassian/jira/lib

Restart Jira:

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

Step 4: Configure JIRA Nginx Proxy on CentOS 8 / RHEL 8

Install Nginx web server and enable the service.

sudo yum -y install nginx
sudo systemctl enable --now nginx

Configure the HTTP Connector

Edit the Jira server configuration file.

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

Locate this code segment:

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

And add the proxyName and proxyPort elements (replacing them with the appropriate properties), and another connector below – this is used for troubleshooting to bypass the proxy:

proxyName="jira.computingforgeeks.com" proxyPort="80"/>

Also add these new lines for bypassing proxy.

<!-- Standard HTTP Connector -->
       <Connector port="8082" maxThreads="150" minSpareThreads="25" connectionTimeout="20000" enableLookups="false"
                  maxHttpHeaderSize="8192" protocol="HTTP/1.1" useBodyEncodingForURI="true"
                  redirectPort="8443" acceptCount="100" disableUploadTimeout="true"/>     

Don’t forget to replace jira.computingforgeeks.com in your configurations. Your configs should look like below:

Restart Jira:

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

Configure Nginx

Create a new Nginx configuration file for Jira.

sudo vi /etc/nginx/conf.d/jira.conf

Update the Nginx settings to have the below server (replacing jira.computingforgeeks.com with the FQDN and localhost with the hostname of the server if Nginx sits in a different server):

server {
    listen 80;
    server_name jira.computingforgeeks.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;
    }
}

Disable Nginx and restart Jira and Nginx

sudo setenforce 0
sudo sed -i 's/^SELINUX=.*/SELINUX=permissive/g' /etc/selinux/config
sudo  /etc/init.d/jira stop
sudo  /etc/init.d/jira start
sudo systemctl restart nginx

Confirm the status of the two services:

$ systemctl status jira nginx
● jira.service
   Loaded: loaded (/etc/rc.d/init.d/jira; generated)
   Active: active (running) since Mon 2020-01-06 16:06:27 EAT; 22s ago
     Docs: man:systemd-sysv-generator(8)
  Process: 6299 ExecStop=/etc/rc.d/init.d/jira stop (code=exited, status=0/SUCCESS)
  Process: 6393 ExecStart=/etc/rc.d/init.d/jira start (code=exited, status=0/SUCCESS)
    Tasks: 89 (limit: 11512)
   Memory: 357.4M
   CGroup: /system.slice/jira.service
           └─6430 /opt/atlassian/jira/jre//bin/java -Djava.util.logging.config.file=/opt/atlassian/jira/conf/logging.properties -Djava.util.logging.man>

Jan 06 16:06:27 centos8.novalocal jira[6393]:                `UOJ
Jan 06 16:06:27 centos8.novalocal jira[6393]: [1B blob data]
Jan 06 16:06:27 centos8.novalocal jira[6393]:       Atlassian Jira
Jan 06 16:06:27 centos8.novalocal jira[6393]:       Version : 8.19.1
Jan 06 16:06:27 centos8.novalocal jira[6393]: [19B blob data]
Jan 06 16:06:27 centos8.novalocal jira[6393]: If you encounter issues starting or stopping Jira, please see the Troubleshooting guide at https://docs.a>
Jan 06 16:06:27 centos8.novalocal jira[6393]: Server startup logs are located in /opt/atlassian/jira/logs/catalina.out
Jan 06 16:06:27 centos8.novalocal jira[6393]: Tomcat started.
Jan 06 16:06:27 centos8.novalocal runuser[6399]: pam_unix(runuser:session): session closed for user jira
Jan 06 16:06:27 centos8.novalocal systemd[1]: Started jira.service.

● nginx.service - The nginx HTTP and reverse proxy server
   Loaded: loaded (/usr/lib/systemd/system/nginx.service; enabled; vendor preset: disabled)
   Active: active (running) since Mon 2020-01-06 16:06:43 EAT; 6s ago
  Process: 6540 ExecStart=/usr/sbin/nginx (code=exited, status=0/SUCCESS)
  Process: 6538 ExecStartPre=/usr/sbin/nginx -t (code=exited, status=0/SUCCESS)
  Process: 6537 ExecStartPre=/usr/bin/rm -f /run/nginx.pid (code=exited, status=0/SUCCESS)
 Main PID: 6542 (nginx)
    Tasks: 2 (limit: 11512)
   Memory: 3.9M
   CGroup: /system.slice/nginx.service
           ├─6542 nginx: master process /usr/sbin/nginx
           └─6543 nginx: worker process

Jan 06 16:06:43 centos8.novalocal systemd[1]: Starting The nginx HTTP and reverse proxy server...
Jan 06 16:06:43 centos8.novalocal nginx[6538]: nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
Jan 06 16:06:43 centos8.novalocal nginx[6538]: nginx: configuration file /etc/nginx/nginx.conf test is successful
Jan 06 16:06:43 centos8.novalocal systemd[1]: nginx.service: Failed to parse PID from file /run/nginx.pid: Invalid argument
Jan 06 16:06:43 centos8.novalocal systemd[1]: Started The nginx HTTP and reverse proxy server.

Allow http port in the firewall:

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

Once installation is complete head to jira.example.com in your browser to begin the setup process.

Select “I’ll set it up myself“.

Click “Next” and provide the MySQL database credentials. For the type, choose “My Own Database

Click Test Connection and a successful connection message should be displayed.

In the next pages, fill out the ‘Application title‘, ‘Mode‘, JIRA License , Admin Account, email notification. The last page will ask you to select default Language.

Access Jira Admin dashboard to create more users.

In our next guide, we’ll cover securing your Jira installation with Let’s Encrypt SSL Certificate.

More guides:


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK