前言

JIRA是Atlassian公司出品的项目与事务跟踪工具,被广泛应用于缺陷跟踪、客户服务、需求收集、流程审批、任务跟踪、项目跟踪和敏捷管理等工作领域。

JIRA中配置灵活、功能全面、部署简单、扩展丰富,其超过150项特性得到了全球115个国家超过19,000家客户的认可。

一、jdk安装

1、检查 yum 中有没有 java1.8 包

yum list java-1.8*

2、开始安装

yum install -y java-1.8.0-openjdk* 

3、验证

[root@localhost data]# java -version
openjdk version "1.8.0_252"
OpenJDK Runtime Environment (build 1.8.0_252-b09)
OpenJDK 64-Bit Server VM (build 25.252-b09, mixed mode)

二、mysql安装

1、mysql安装

参考网址:https://www.liuwg.com/archives/MysqlInstall

  • Mysql安装版本:5.7.30
  • Jira数据库名:jiradb
  • 连接用户名:jira_wr
  • 密码:MysqlPassword@123

2、创建jira数据库

mysql> CREATE DATABASE jiradb CHARACTER SET utf8mb4 COLLATE utf8mb4_bin;

3、创建jira连接用户及权限

mysql> GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,DROP,REFERENCES,ALTER,INDEX on jiradb.* TO 'jira_wr'@'%' IDENTIFIED BY 'MysqlPassword@123';   #或者使用:grant all privileges on jiradb.* TO 'jira_wr'@'%' IDENTIFIED BY 'MysqlPassword@123';

mysql> flush privileges;

4、编辑my.cnf配置文件

[root@localhost /]# vi /etc/my.cnf #在[mysqld]尾部加入以下配置信息:

[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

如下图所示:
image-8e682cf2009a4fcba9303598cd19be3d

[root@localhost /]# systemctl restart mysqld   #重启mysql服务,修改配置即生效。

三、jira安装

1、jira下载

官方下载网址:https://www.atlassian.com/software/jira/download

jira 8.8.1版本下载网址:https://www.atlassian.com/software/jira/downloads/binary/atlassian-jira-software-8.8.1-x64.bin

mysql驱动文件:mysql-connector-java-5.1.48.jar、以及atlassian-extras-3.2.jar(授权文件)

将下载的文件上传到服务器/data/目录:

[root@localhost data]# ll
total 394112
-rwxr-xr-x 1 root root    156503 Apr 26 00:51 atlassian-extras-3.2.jar
-rwxr-xr-x 1 root root 402401644 Apr 26 00:50 atlassian-jira-software-8.8.1-x64.bin
-rw-r--r-- 1 root root   1006956 Jul 11  2019 mysql-connector-java-5.1.48.jar

2、jira安装

[root@localhost data]# chmod +x atlassian-jira-software-8.8.1-x64.bin
[root@localhost data]# ./atlassian-jira-software-8.8.1-x64.bin 
Unpacking JRE ...
Starting Installer ...

This will install Jira Software 8.8.1 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]      #这里三个选项的含义分别是快速安装(默认设置)、自定义安装以及升级现有的JIRA,我们这里选择1,使用默认设置安装。
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 
Install [i, Enter], Exit [e]
i

Extracting files ...
                                                                           

Please wait a few moments while Jira Software is configured.

Installation of Jira Software 8.8.1 is complete
Start Jira Software 8.8.1 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.8.1 is complete
Your installation of Jira Software 8.8.1 is now ready and can be accessed
via your browser.
Jira Software 8.8.1 can be accessed at http://localhost:8080
Finishing installation ...

并将mysql驱动文件与atlassian-extras-3.2.jar拷贝到jira指定目录/opt/atlassian/jira/atlassian-jira/WEB-INF/lib,并重启jira服务。

[root@localhost data]# mv /opt/atlassian/jira/atlassian-jira/WEB-INF/lib/atlassian-extras-3.2.jar  /opt/atlassian/jira/atlassian-jira/WEB-INF/lib/atlassian-extras-3.2.jar_bak   #备份原文件atlassian-extras-3.2.jar

[root@localhost data]# cp atlassian-extras-3.2.jar /opt/atlassian/jira/atlassian-jira/WEB-INF/lib/
[root@localhost data]# cp mysql-connector-java-5.1.48.jar /opt/atlassian/jira/atlassian-jira/WEB-INF/lib/
[root@localhost data]# cd cd /opt/atlassian/jira/bin/
[root@localhost bin]# ./shutdown.sh     #关闭jira服务
[root@localhost bin]# ./start-jira.sh    #启动jira服务

3、jira部署

打开网址:http://ip:8080/,默认端口是8080,选择中文语音进行安装。
image-c0c9493257be4118b697b6880bc8e1c3
选择“我将设置它自己”,进行下一步:
image-54ffebbb99044a09bfa73aa604edb4c0
本次安装不选择内置数据库,而选择其它数据库,因数据库与jira安装在同一台机器上,所以主机地址使用127.0.0.1,测试连接显示“数据库连接测试成功”,方可进行下一步操作:

image-9d0bd831bc3d46d09d2f47787c9b28c7
image-78defe0d468246cab1cb51f2d628fdaf-1666775583512

根据服务器ID信息申请许可证,如下图,然后进行下一步:
image-050653e5e3cb44fead3137c973bab03b

接着需配置jira管理员帐号及密码,即可开启jira服务了!!!
image-1e3a294e5826471482ff66929933d765-1666775734683
image-e38490629bea4632b7f805e83941845a-1666775752477
image-2797cdf9eccb4690bf32c356bb74974d-1666775734688

附:另一种授权方式
1、下载 atlassian-agent.jar
https://gitee.com/pengzhile/atlassian-agent/releases
注:将下载atlassian-agent.jar上传到服务器/data/目录。
2、获取license

[root@localhost data]# export JAVA_OPTS="-javaagent:/data/atlassian-agent.jar ${JAVA_OPTS}"

[root@localhost data]# java -jar atlassian-agent.jar -p jira -m jira@163.com -n jira -o jira -s AAAA-BBBB-CCCC-DDDD 

注:其中AAAA-BBBB-CCCC-DDDD是安装jira的服务器ID)
image-66f6a4bd68ab41959d3c84a1fa333eb6

文章作者: 阳光•雨
本文链接:
版权声明: 本站所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来自 阳光•雨
Linux jira安装与部署
喜欢就支持一下吧