一、安装说明
系统:CentOS 6.7 x64 export LANG="zh_CN.UTF-8" # 否则中文无法显示,还是英文
安装java 1.7.x版本jdk
安装mysql 5.1及以上版本
二、数据库配置创建
mysql:
>>create database jira636 character set utf8 ;
>>GRANT ALL ON jira636.* TO jira_user@'localhost' IDENTIFIED BY 'PASSWORD';
my.cnf文件中添加:
binlog_format=ROW
三、安装时临时用授权码:
AAABBw0ODAoPeNptkFtLxDAQhd/zKwI+R9Kwy66FPKxthGhvtF0p4kuso0a6sUwvuP/edissyj4MDHPOfHOYqzu0tICWeoJy4a+FzzkNwpIK7q1ICF2Ntu3tl5P3Ot89+1SNphnMPCEBwqkJTQ9y9jN+wzxBPi2a68jW4DpQr/a0rZJS5VmuC0XOBNnjAH/s5bGFxBxABmkcqzzQu2jRTd3bEZaFZvE+AnYzRJDYWNeDM64G9d1aPJ4TeXxOlOK7cbZbjrbNgkyGwwtg+rbvJpBkHikAR0Adytt0XzFV7R5Y+qQzVkWZIoVK5FQsWq03YrvdkN/Ekz3S4SXlcpRswPrDdPD/aT+P1nzDMC0CFQCM9+0LlHVNnZQnSTwuRO3eK+2gVgIUCteTs4Q3khIgrnsY64hxYB/d8bM=X02dh
临时授权来自:
https://my.atlassian.com/products/index?sen=6866285&wasArchived=true#license_6866285
四、本次安装授权码实例为:
Description=JIRA: Commercial,
CreationDate=2015-11-26,
jira.LicenseEdition=ENTERPRISE,
Evaluation=false,
jira.LicenseTypeName=COMMERCIAL,
jira.active=true,
licenseVersion=2,
MaintenanceExpiryDate=2099-12-31,
Organisation=pl,
SEN=SEN-L4572887,
ServerID=BQQU-WQL4-PNF4-PP07,
jira.NumberOfUsers=-1,
LicenseID=AAABPQ0ODAoPeNqFkcFPwjAUxu/9K5p40UOXbWGAJE3EMRPMGIOBXLzU7Q1rtnZ57Yj89xYh0RgTDn2Hr6/f732vNzuoaKYPNIxoGEyi0cQf0LjY0NAPIjIDU6LsrNSK5xptrRupaa2RPs/XU3pbAB4A714nNDmIphenRpL17Rvgst4aQMNZQGKE75uZsMBPviwIWDgkpW49FJUUyrZSVcZDLapWdIZ9SBSeKK08ALfYw7XWVJagDGyOHWSiBR4vF4tkHc+n6bWXhRVoAXktGgMk1so6bLIQsuFHrfalV7n6sG+d4Dkr8pPzPFhzJr+4qCctvMYD5WgdSnMJ5khOUUKVkHx2Eo+/lhSyMCJL3AslzRn5uFpt2W6VDliePbmS+yNSJBl3h6XD8cgf34/JZRn/2+U9lu/CwN+/+AIh1LD8MCwCFCpTYLfLxyOb4GDlDaMHNphYqpriAhQZgNY8zMpGEnGr3/Iw2HlI/Yjlvg==X02fr,
LicenseExpiryDate=2099-12-31,
PurchaseDate=2015-11-26
五、整合添加jira系统服务脚本
jira sysv 脚本内容如下:
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
|
#!/bin/sh
# JIRA service
#
# chkconfig: - 95 05
# Author: San
# Date: 2015-12-01
LANG=
"zh_CN.UTF-8"
export
LANG
.
/etc/rc
.d
/init
.d
/functions
Prog_Dir=
/data1/Jira/atlassian-jira-6
.3.6-standalone
/bin
prog=jira
pidfile=${PIDFILE-
/var/run/jira
.pid}
lockfile=${LOCKFILE-
/var/lock/subsys/jira
}
args=
"--daemon --pid-file=${pidfile} $OPTIONS"
lockfile=
/var/lock/subsys/
$prog
cd
$Prog_Dir
start() {
[ -x $Prog_Dir
/start-jira
.sh ] ||
exit
5
echo
-n $
"Starting $prog: "
daemon --pidfile=${pidfile} $Prog_Dir
/start-jira
.sh $args
retval=$?
echo
if
[ $retval -
eq
0 ];
then
touch
$lockfile || retval=4
fi
pid=$(
ps
aux |
grep
jira |
grep
-
v
grep
|
awk
'{print $2}'
)
echo
$pid >
/var/run/jira
.pid
return
$retval
}
stop() {
echo
-n $
"Stopping $prog: "
killproc -p ${pidfile} $prog
retval=$?
echo
[ $retval -
eq
0 ] &&
rm
-f $lockfile
return
$retval
}
restart() {
stop
start
}
rh_status_q() {
rh_status >
/dev/null
2>&1
}
rh_status() {
# run checks to determine if the service is running or use generic status
status -p ${pidfile} $prog
}
case
"$1"
in
start)
rh_status_q &&
exit
0
$1
;;
stop)
rh_status_q ||
exit
0
$1
;;
restart)
$1
;;
status)
rh_status
;;
*)
echo
$
"Usage: $0 {start|stop|status|restart}"
exit
2
esac
exit
$?
|
添加到系统服务并设置开机自启
#chkconfig --add jira
#chkconfig jira on
六、相关错误说明:
service jira start 出现如下错:
Neither the JAVA_HOME nor the JRE_HOME environment variable is defined
At least one of these environment variable is needed to run this program
原因:找不到jdk或者jre路径。
解决办法:在setclasspath.bat的开头声明环境变量,打开tomcat的bin目录下面的setclasspath.sh,添加红色部分,路径修改为自己机器jdk和jre路径即可
export JAVA_HOME=/usr/java/jdk1.7.0_79
export JRE_HOME=/usr/java/jdk1.7.0_79/jre
七、安装部署安装参考文档:
http://blog.163.com/super_lpc/blog/static/6777789201544426429/
http://blog.csdn.net/mchdba/article/details/39441871
http://www.cnblogs.com/candle806/p/4095635.html