JIRA Software是 Atlassian公司开发的课题管理工具(项目管理工具)。 通过高度的自定义性,不仅是bug管理工具,还有任务管理,工数管理,进度管理,日程管理等整个项目的管理。统一管理多个项目的进度和任务。 JIRA Software 是整合旧JIRA和旧JIRA Agile的敏捷开发工具。不是敏捷开发方面的熟手也可以很快上手。 JIRA Software 可以很方便的实现团队任务的可视化。 通过操作Scrum板、看板。
参考链接
- Jira 官方网站
- 基于JIRA的Scrum敏捷开发的项目管理
- JIRA - 使用指南(项目跟踪管理工具)
- 初识Atlassian
- downloading Jira Software Server
- Administering JIRA applications 7.5
- 敏捷团队专用的开发工具
- 管理 My Atlassian
安装参考
正式安装
卸载旧版,如果有的话
备份旧版数据,然后删除数据库并重建。1
rm -rf /var/atlassian/ /opt/atlassian/ /etc/init.d/jira
环境准备
jira 的运行是依赖java环境的,也就是说需要安装 jdk,本文安装的是 7.5.2,需要安装 1.8 以上的 jdk 版本
除此之外,我们还需要为 jira 创建对应的数据库、用户名和密码,如下:1
2
3
4
5
6
7
8
9mysql -uroot -p'password'
mysql> create schema if not exists jira default character set utf8mb4;
Query OK, 1 row affected (0.00 sec)
mysql> grant all on jira.* to 'jira'@'%' identified by 'jiraSoftPWD';
Query OK, 0 rows affected (0.00 sec)
mysql> FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.00 sec)
安装
以下安装过程,一路回车,用默认设置即可。1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52[root@192 ~]# chmod 755 atlassian-jira-software-7.5.2-x64.bin
[root@192 ~]# ./atlassian-jira-software-7.5.2-x64.bin
Unpacking JRE ...
Starting Installer ...
Nov 12, 2017 3:07:51 PM java.util.prefs.FileSystemPreferences$2 run
INFO: Created system preferences directory in java.home.
This will install JIRA Software 7.5.2 on your computer.
OK [o, Enter], Cancel [c]
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]
Where should JIRA Software be installed?
[/opt/atlassian/jira]
Default location for JIRA Software data
[/var/atlassian/application-data/jira]
Configure which ports JIRA Software will use.
JIRA requires two TCP ports that are not being used by any other
applications on this machine. The HTTP port is where you will access JIRA
through your browser. The Control port is used to startup and shutdown JIRA.
Use default ports (HTTP: 8080, Control: 8005) - Recommended [1, Enter], Set custom value for HTTP and Control ports [2]
JIRA can be run in the background.
You may choose to run JIRA as a service, which means it will start
automatically whenever the computer restarts.
Install JIRA as Service?
Yes [y, Enter], No [n]
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]
Extracting files ...
Please wait a few moments while JIRA Software is configured.
Installation of JIRA Software 7.5.2 is complete
Start JIRA Software 7.5.2 now?
Yes [y, Enter], No [n]
n
Installation of JIRA Software 7.5.2 is complete
Your installation of JIRA Software 7.5.2 is now ready.
Finishing installation ...
[root@192 ~]#
复制破解文件(如果下载不到,请留言)
把破解包里面的 atlassian-extras-3.1.2.jar 和 mysql-connector-java-5.1.39-bin.jar 两个文件复制到 /opt/atlassian/jira/atlassian-jira/WEB-INF/lib/目录下。
其中 atlassian-extras-3.1.2.jar 是用来替换原来的 atlassian-extras-3.1.2.jar 文件,用作破解 jira 系统的。
而 mysql-connector-java-5.1.39-bin.jar 是用来连接 mysql 数据库的驱动软件包。
因为我们没有正式的 license,所以需要我们在 jira 官网注册一个账号,然后利用这个账号申请一个可以试用 30 天的 license
启动 jira
1 | [root@192 jira]# service jira start |
访问
jira 的 web 服务器用的是 tomcat,其配置文件存放在 /opt/atlassian/jira/conf/server.xml 文件,默认端口是 8080。
浏览器输入:IP:8080
用 chrome 访问,出于安全考虑,强制在 http 后加上了 s,就成了 https:IP:8080这样访问了,于是报错:1
2
3
4
5
6
7
8
9
10
11
12
1312-Nov-2017 15:20:52.406 INFO [http-nio-8080-exec-2] org.apache.coyote.http11.Http11Processor.service Error parsing HTTP request header
Note: further occurrences of HTTP header parsing errors will be logged at DEBUG level.
java.lang.IllegalArgumentException: Invalid character found in method name. HTTP method names must be tokens
at org.apache.coyote.http11.Http11InputBuffer.parseRequestLine(Http11InputBuffer.java:462)
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:667)
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:802)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1410)
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:745)
换一个不加 s 的浏览器访问就 OK 了。
常用脚本
1 | cd /opt/atlassian/jira/logs/ |
为 jira 配置域名
用 nginx 反向代理达到访问 jira (用的 tomcat 作为 web 服务器) 的默认端口应用程序时,域名不加端口 8080,对外就象是使用默认的 80 端口一样1
2cd /usr/local/nginx/vhosts
vim jira.conf
内容如下1
2
3
4
5
6
7
8
9
10
11
12
13
14server {
listen 80;
server_name jira.domain.com;
charset utf-8;
access_log /opt/atlassian/jira/logs/jira.domain.com.access.log;
error_log /opt/atlassian/jira/logs/jira.domain.com.error.log;
location / {
proxy_pass http://localhost:8080;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}
使配置生效1
/usr/local/nginx/sbin/nginx -s reload
局域网设置域名指向
设置从 hosts 设置的域名访问时,如果是二级域名,用 chrome/firefox/edge 访问时,会强制用 https 访问,改成一级域名可避免这个问题。
java.net.UnknownHostException: jira.domain.com
1 | java.net.UnknownHostException: ybdjira.com |
解决:1
2
3vi /etc/hosts
#添加:
127.0.0.1 jira.domain.com
或者(也许是并且,因为部署在局域网内,外部无法访问。系统有监控需要通过这个基本 URL 来访问),在系统设置页面,将基本 URL 改成:http://localhost:8080
是在把基本 URL 改成: http://localhost:8080 之前抛的错。
查看 jira 历史版本
下载特定版本
将下面的链接的版本号改成上面列出的某一个即可,比如要下载 7.9.2
linux 版本:
https://www.atlassian.com/software/jira/downloads/binary/atlassian-jira-software-7.9.2-x64.bin
windows 版本:
https://www.atlassian.com/software/jira/downloads/binary/atlassian-jira-software-7.9.2-x64.exe
docker
破解版本,备份与恢复
备份
备份安装文件
1
2rm -rf /opt/atlassian/jira/logs/*
tar -czvf jira.tar.gz /var/atlassian/ /opt/atlassian/ /etc/init.d/jira备份数据库
1
mysqldump --default-character-set=utf8mb4 -uroot -p'password' jira > /root/jiraBack.sql
恢复
假设目标服务器没有安装过 jira。
- 下载相同版本并在目标服务器上安装,目的是让安装程序把 jira 服务以及运行用户创建好,之后的事情,只是简单的替换已经破解过的安装文件和数据库而已。
删除刚刚安装的文件。
1
rm -rf /var/atlassian/ /opt/atlassian/ /etc/init.d/jira
将备份的 jira 安装文件 copy 至根目录 /,然后解压
1
tar -xzvf jira.tar.gz
恢复备份的数据库
1
2
3
4
5
6
7
8mysql -uroot -p'password'
mysql> use jira;
Database changed
mysql> set names utf8mb4;
Query OK, 0 rows affected (0.00 sec)
mysql> source /root/jiraBack.sql
...
修改数据库配置
1 | vim /var/atlassian/application-data/jira/dbconfig.xml |
启动用户,默认是 jira
第一次安装,会创建 jira 的启动用户,用户名就是 jira
如果安装过第二次,那么,会再创建一个用户 jira1
所以,如果备份的是第二次安装的版本,那么,恢复之后,启动,会提示 jira1 这个用户不存在1
2
3
4
5[root@AndyCentOS7Basic init.d]# service jira start
To run JIRA in the foreground, start the server with start-jira.sh -fg
executing using dedicated user: jira1
runuser: user jira1 does not exist
解决办法就是,安装两次,第二安装完毕再进行恢复操作。
查看 jira 日志
1 | tail -f /opt/atlassian/jira/logs/catalina.out |