系统环境centos8
官方文档 Installing Jira applications on Linux | Administering Jira applications Data Center and Server 9.1 | Atlassian Documentation
1.下载程序包
a,访问下载连接,进行下载最新的安装包 更新 Jira Software Server | Atlassian
# 软件包大概441M
mkdir -p /data/
cd /data/
https://www.atlassian.com/software/jira/downloads/binary/atlassian-jira-software-9.1.0.tar.gz
b,准备数据库Connecting Jira applications to a database | Administering Jira applications Data Center and Server 9.1 | Atlassian Documentation
b.1 本次使用的是postgresql数据库 Connecting Jira applications to PostgreSQL | Administering Jira applications Data Center and Server 9.1 | Atlassian Documentation
postgresql 数据库安装可以参考 安装postgresql 数据库_第九系艾文的博客-CSDN博客
CREATE USER jiradbuser WITH ENCRYPTED PASSWORD 'jiradbpwd..';
CREATE DATABASE jiradb WITH ENCODING 'UNICODE' LC_COLLATE 'C' LC_CTYPE 'C' TEMPLATE template0;
grant all privileges on database jiradb to jiradbuser;
c,准备jdk环境,如有可忽略
Jira requires 1.8 or 11 to run.Centos 8 默认安装就是1.8的,可以通过dnf直接安装
dnf install java -y
2.安装
tar xvf atlassian-jira-software-9.1.0.tar.gz
cd atlassian-jira-software-9.1.0-standalone/
一种是通过jira自带的命令进行配置
cd /data/atlassian-jira-software-9.1.0-standalone/bin
./config.sh
第二种是自己进行配置
a.创建jira-home 并配置
mkdir -pv /data/jira-home
vim /data/atlassian-jira-software-9.1.0-standalone/atlassian-jira/WEB-INF/classes/jira-application.properties
# 增加配置项
jira.home = /data/jira-home
b.在jira-home下创建一个文件名为 dbconfig.xml 的文件,用与连接数据库
vim dbconfig.xml
defaultDS
default
postgres72
public
jdbc:postgresql://127.0.0.1:5432/jiradb
org.postgresql.Driver
jiradbuser
jiradbpwd..
40
40
30000
select 1
60000
300000
40
true
300
false
true
tcpKeepAlive=true;socketTimeout=240
c.修改访问端口,默认是8080
vim /data/atlassian-jira-software-9.1.0-standalone/conf/server.xml
d.添加启动用户,并授权,不建议通过root用户启动
useradd --create-home --comment 'Account for running Jira Software' --shell /bin/bash jira
chown -R jira.jira /data/jira-home/ /data/atlassian-jira-software-9.1.0-standalone/
e.启动服务
su - jira
export JAVA_OPTS="-javaagent:/data/jira-home/atlassian-agent.jar"
cd /data/atlassian-jira-software-9.1.0-standalone/bin
./start-jira.sh
3.密钥破解
java -jar atlassian-agent.jar -m '[email protected]' -p jira -o 'http://192.168.179.132:8080' -s 'BINY-U5YX-P3QI-WXGV'
将通过命令获取的license填入页面License Key中
打开页面会发现有错误提示
您使用的产品许可证不合法。请联系您的许可证颁发者或颁发机构
看了下文档,是新版本增加了加入了一个证书哈希验证,可以自己下载源码编译
GitHub - nineaiyu/atlassian-agent: Atlassian's productions crack.
git clone https://github.com/nineaiyu/atlassian-agent.git
cd atlassian-agent
vim src/main/java/io/zhile/crack/atlassian/agent/KeyTransformer.java
#将大概74行代码修改一下,把路径修改为自己本地路径
File libs = new File("/data/atlassian-jira-software-9.1.0-standalone/atlassian-jira/WEB-INF/lib/");
# 保存退出
编译jar包
1.安装maven环境
dnf install maven -y
2.增加国内pom源,可以增加阿里云
vim /etc/maven/settings.xml
aliyun
central
aliyun
http://maven.aliyun.com/nexus/content/groups/public/
3.执行编译命令
mvn clean && mvn install -Dmvn.test.skip=true
4.将编译好的jar包,复制到 /data/jira-home/atlassian-agent.jar
cp target/atlassian-agent-jar-with-dependencies.jar /data/jira-home/atlassian-agent.jar
启动服务
su - jira
export JAVA_OPTS="-javaagent:/data/jira-home/atlassian-agent.jar"
cd /data/atlassian-jira-software-9.1.0-standalone/bin
./start-jira.sh
git上面发现了一个容器部署方案,可以参考 GitHub - haxqer/jira: The simplest docker file of JIRA. Support v9.1.0