其他分享
首页 > 其他分享> > Jira Core安装配置过程

Jira Core安装配置过程

作者:互联网

Jira Core安装配置过程

目录

安装前准备

Oracle JDK8 环境配置

下载地址:https://www.oracle.com/java/technologies/downloads/#java8,选择jdk-8u311-linux-x64.tar.gz

将jdk8压缩包拷贝到/usr/local/software/目录下进行解压,解压得jdk1.8.0_311目录

sudo tar -zxvf jdk-8u311-linux-x64.tar.gz

修改/etc/environment

sudo vim /etc/environment

直接将以下内容覆盖原内容即可

JAVA_HOME=/usr/local/software/jdk1.8.0_311
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:$JAVA_HOME:$JAVA_HOME/bin"

保存修改后,使用以下命令使/etc/environment立即生效

source /etc/environment	

测试测试环境变量是否成功

echo $JAVA_HOME	
# 显示JAVA_HOME路径
/usr/local/software/jdk1.8.0_311

java -version	
# 显示jdk版本信息
java version "1.8.0_311"
Java(TM) SE Runtime Environment (build 1.8.0_311-b11)
Java HotSpot(TM) 64-Bit Server VM (build 25.311-b11, mixed mode)

安装PostgreSQL 12数据库

直接使用apt-get安装即可

sudo apt-get install postgresql-12 -y
sudo ufw enable
sudo ufw allow 5432

数据库创建

创建用户jirauser,密码为“123456”,创建数据库jiradb,将数据库jiradb的权限授予用户jirauser

sudo su - postgres
psql
create user jirauser with password '123456';	
CREATE DATABASE jiradb;						
GRANT ALL PRIVILEGES ON DATABASE jiradb TO jirauser;	
\q
sudo su <当前用户>

此处创建的数据库将在配置Jira Core时使用

Jira Core安装

1.下载jira core

下载地址:https://www.atlassian.com/software/jira/update,选择Linux 64 bit安装程序下载

下载得atlassian-jira-core-8.19.1-x64.bin,将其拷贝到服务器/usr/local/software目录下

2.运行安装程序

cd /usr/local/software
sudo chmod a+x atlassian-jira-core-8.19.1-x64.bin
sudo ./atlassian-jira-core-8.19.1-x64.bin

放开防火墙端口

sudo ufw allow 8080

安装完成即可通过http://localhost:8080/访问Jira

Jira Core配置

1.数据配置

选择My Own Database

点击Test connection,提示连接成功后,点击Next,等待配置完成即可

2.激活

使用atlassian-agent.jar进行激活

atlassian-agent.jar下载地址:https://gitee.com/pengzhile/atlassian-agent/releases

将atlassian-agent.jar文件拷贝到服务器/usr/local/software/目录下

修改setenv.sh文件

cd /opt/atlassian/jira/bin
sudo vim setenv.sh

添加JAVA_OPTS环境变量,保存修改

export JAVA_OPTS="-javaagent:/usr/local/software/atlassian-agent.jar ${JAVA_OPTS}"

重启jira

cd opt/atlassian/jira/bin
sudo ./stop-jira.sh
sudo ./start-jira.sh

在/usr/local/software/目录下执行,注意:-s后的参数为刚刚记下的Server ID

cd /usr/local/software/
java -jar atlassian-agent.jar -p jira -m aaa@bbb.com -n my_name -o https://zhile.io -s BDC9-LWO4-U6QB-XHT8

显示信息如下

====================================================
=======     Atlassian Crack Agent v1.3.1     =======
=======           https://zhile.io           =======
=======          QQ Group: 30347511          =======
====================================================

Your license code(Don't copy this line!!!): 

AAAByw0ODAoPeJx9Um1vmzAY/M6vQNpnKC8LIZUstTFMZeJlXUibb5MhT4JTMMw2SemvHylESpcok
iXLlu+eu/N9S1tQk1yqlqNa1r096ZeKF6lqGZapbDkAK+qmAa6HNAcmIO0aiEkFCCdR5P/GwWOoY
A5E0pp5RAI6AjXT0CxHuQHxQOScNkcUWrKSVlTCWi0HgJp1aiFlI+7v7j4KWoJOayUilElghOXgv
zeUd+M0d6YZ034pO8rJSaW/pgN1HAZRkPqeErdVBjzZLAVwgTTzJO4GV8PrdZtL/XjQRL2RB8JBv
yC68Zbkku4BSd7ClyzP70fPLz3bUbGl+HtStp95og0pBSgJ3xJGxXB1kQuumez5/D6fEhFCHrIs0
/O6GnRdqB3HPRFRoAgf8A/PjCh2k84O0s3u3XBxTH/mH+WbWx8ei+eVfcjatlqxv/HrNpnuo8gxl
pUX7eZbhIYR52ZuZLGQhEvgo6cx/cBDYeAt/FgLTceeWBN3Zk+Mqf3lM6/1ZwF8D7yHzz0808LX5
Lu2dJ7n2uopdZU36E5xmo5hTA3Xtq+W+bImv1qeF0TA/1U+B0PfQ95wKkbTvXx0xcL4MZ/Kq+4P6
/d/HgAp4TAsAhR43AcNod5zLbOBdDtMkNn5F0O5HwIUfhdVflhgPSHmeq+RqkM/b6PJaoE=X02lt

将license code拷贝到License key窗口点击continue即可成功激活

3.设置管理员

输入用户名和密码及必要信息
点击Next即可完成配置

以服务方式运行

1.创建jira.service文件

停止正在运行的jira

cd opt/atlassian/jira/bin
sudo ./stop-jira.sh
sudo vim /etc/systemd/system/jira.service

jira.service文件内容如下

[Unit]
Description=Atlassian Jira
After=syslog.target network.target

[Service]
Type=forking
User=jira
ExecStart=/opt/atlassian/jira/bin/start-jira.sh
ExecStop=/opt/atlassian/jira/bin/stop-jira.sh
SuccessExitStatus=143

[Install]
WantedBy=multi-user.target 

删除原来的jira文件

sudo rm /etc/init.d/jira

2.启动服务

sudo systemctl enable jira
sudo systemctl start jira 

经验证,Jira可以实现开机自动启动

标签:Jira,Core,local,sudo,atlassian,usr,jira,安装
来源: https://www.cnblogs.com/dctwan/p/15474966.html