Introduction
This guide covers the installation of Jira and Confluence on CentOS 7.4. The instructions are based on Jira version 9.11.3 and Confluence version 8.6.1, but the process is similar for other versions.
Prerequisites
- A CentOS 7.4 system
- Basic Linux command-line knowledge
- Java installed
System Time Verification
Check the system date with the following command:
date
If the date is incorrect, update it using:
yum -y install ntp ntpdate
ntpdate cn.pool.ntp.org
date
Installation Steps
1. Install Java
yum install java -y
2. Create Directory and Download Files
Install wget if not already installed:
yum install wget -y
Create a directory and download the necessary files:
mkdir /atlassian
cd /atlassian
wget http://file.xujian.tech/atlassian-agent.jar
wget https://product-downloads.atlassian.com/software/jira/downloads/atlassian-jira-software-8.20.7-x64.bin
3. Install Jira
Make the binary executable and run it:
chmod u+x atlassian-jira-software-8.20.7-x64.bin
./atlassian-jira-software-8.20.7-x64.bin
During installation, press Enter to accept all default options.
4. Modify setenv.sh
Navigate to the Jira bin directory and edit the setenv.sh file:
cd /opt/atlassian/jira/bin
vi setenv.sh
Add the following line at the end of the file:
export JAVA_OPTS="-javaagent:/atlassian/atlassian-agent.jar ${JAVA_OPTS}"
5. Install and Configure MySQL
Install MySQL 5.7 and configure it for Jira. Modify the my.cnf file:
vi /etc/my.cnf
Add the following under the [mysqld] section:
default-storage-engine=INNODB
max_allowed_packet=256M
innodb_log_file_size=256M
character_set_server=utf8mb4
innodb_default_row_format=DYNAMIC
innodb_large_prefix=ON
innodb_file_format=Barracuda
transaction-isolation=READ-COMMITTED
Create a database for Jira:
CREATE DATABASE jira CHARACTER SET utf8mb4 COLLATE utf8mb4_bin;
Restart MySQL:
service mysqld restart
6. Copy MySQL Driver to Jira
Download the MySQL connector and place it in the Jira lib directory:
cd /opt/atlassian/jira/lib
wget http://file.xujian.tech/mysql-connector-java-5.1.49.jar
7. Restart Jira
Stop and start the Jira service:
service jira stop
service jira start
To avoid access issues, disable the firewall or open port 8080:
systemctl stop firewalld.service
Configuration Process
1. Language and Installation Type
Select your preferred language and installation type during the initial setup.
2. Database Configuraton
Choose "Other Database" and enter the database details. Test the connection and proceed.
3. License Atcivation
Copy the Server ID from the Jira setup page and use it to generate a license key. Paste the key into the Jira setup page to activate.
4. Administrator Account Setup
Create an administrator account and configure email notifications as needed.
5. Completion
Follow the remaining prompts to complete the setup. The process may involve several database operations, so be patient.
Verifying License Validity
To check the license status, go to the application settings in Jira and view the application information.