CentOS7.7 下Jira8.8.1 安装与部署

CentOS7.7 下Jira8.8.1 安装与部署

前言

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.png

[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.png
选择“我将设置它自己”,进行下一步:
image.png
本次安装不选择内置数据库,而选择其它数据库,因数据库与jira安装在同一台机器上,所以主机地址使用127.0.0.1,测试连接显示“数据库连接测试成功”,方可进行下一步操作:
image.png
image.png

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

接着需配置jira管理员帐号及密码,即可开启jira服务了!!!
image.png
image.png
image.png

附:另一种授权方式
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.png

评论

Your browser is out-of-date!

Update your browser to view this website correctly. Update my browser now

×