jira本地部署

 

安装jdk并验证

yum install java-1.8.0-openjdk* -y
java -version

下载地址分别为:

https://pan.baidu.com/s/1pL7KmGb       提取密码:rgiv
https://pan.baidu.com/s/1htOIekG      提取密码:29te
https://pan.baidu.com/s/1nwJNkxF      提取密码:354f
 
然后关闭jira,把破解包里面的atlassian-extras-3.2.jar和mysql-connector-java-5.1.39-bin.jar两个文件复制到/opt/atlassian/jira/atlassian-jira/WEB-INF/lib/目录下。
[root@test-vm03 opt]# /etc/init.d/jira stop
[root@test-vm03 opt]# lsof -i:8080
[root@test-vm03 opt]# cp /opt/atlassian-extras-3.2.jar /opt/atlassian/jira/atlassian-jira/WEB-INF/lib/
[root@test-vm03 opt]# cp /opt/mysql-connector-java-5.1.39-bin.jar /opt/atlassian/jira/atlassian-jira/WEB-INF/lib/
 
[root@test-vm03 opt]# /etc/init.d/jira start
[root@test-vm03 opt]# lsof -i:8080                        //稍等一会儿,端口才会起来
COMMAND   PID USER   FD   TYPE DEVICE SIZE/OFF NODE NAME
java    79629 jira   73u  IPv6 811723      0t0  TCP *:webcache (LISTEN)
 
其中atlassian-extras-3.2.jar是用来替换原来的atlassian-extras-3.1.2.jar文件,用作破解jira系统的。
而mysql-connector-java-5.1.39-bin.jar是用来连接mysql数据库的驱动软件包。

 

### dokcer版本部署

mkdir -p /home/data/jira

cd /home/data/jira/
vi Dockerfile

  FROM cptactionhank/atlassian-jira-software:8.1.0
  USER root
  # 将代理破解包加入容器
  COPY "atlassian-agent.jar" /opt/atlassian/jira/
  # 设置启动加载代理包
  RUN echo 'export CATALINA_OPTS="-javaagent:/opt/atlassian/jira/atlassian-agent.jar ${CATALINA_OPTS}"' >> /opt/atlassian/jira/bin/setenv.sh

docker build -t jira:8.1.0 .
docker run -d --name jira --restart always -p 8080:8080 -e TZ="Asia/Shanghai" -m 4096M -v /home/data/jira:/var/atlassian/jira jira:8.1.0
docker exec -it jira /bin/bash
cd /opt/atlassian/jira/
java -jar atlassian-agent.jar -d -m test@test.com -n BAT -p jira -o http://172.16.66.213:8080 -s B556-0EQP-L8VN-TQAO

###mysql安装

docker pull mysql:5.7.24
docker run --name mysql5.7 --restart always -p 3306:3306 -e MYSQL_ROOT_PASSWORD=admin -d mysql:5.7.24
docker exec -it mysql5.7 /bin/bash
mysql -uroot -p
root
CREATE DATABASE jira CHARACTER SET utf8mb4 COLLATE utf8mb4_bin;
CREATE user 'jira'@'%' IDENTIFIED BY 'admin';
GRANT ALL PRIVILEGES ON jira.* TO 'jira'@'%' WITH GRANT OPTION;
CREATE DATABASE confluence CHARACTER SET utf8mb4 COLLATE utf8mb4_bin;
SET GLOBAL TRANSACTION ISOLATION LEVEL READ COMMITTED;

##修改容器内的mysql配置文件,并复制回去

docker cp mysql5.7:/etc/mysql/mysql.conf .

  [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



 

posted @ 2024-02-27 14:58  邓聪聪  阅读(493)  评论(0编辑  收藏  举报