JIRA+MySQL配置
1、JDK、JIRA、MySQL安裝完畢,停止JIRA服務(wù)
創(chuàng )建數據庫:
mysql
create database jiradb character set ‘UTF8′;
創(chuàng )建用戶(hù)并賦與權限:
create user jirauser identified by ‘jira’;
grant all privileges on *.* to ‘jirauser’@'%’ identified by ‘jira’ with grant option;
grant all privileges on *.* to ‘jirauser’@'localhost’ identified by ‘jira’ with grant option;
flush privileges;
2、修改JIRA端口
JIRA是集成在Tomcat上面的,所以修改端口的方法和Tomcat修改端口的方法是一樣的。
3、JIRA默認使用的數據庫是HSql,如果要遷移到MySQL,可以通過(guò)以下的配置改動(dòng)。
1)修改server.xml (路徑:/jira/conf/server.xml)
第13行:
username=”jirauser”
password=”780824″
driverClassName=”com.mysql.jdbc.Driver”
url=”jdbc:mysql://localhost:3306/jiradb?autoReconnect=true&useUnicode=true&characterEncoding=UTF8″
(刪除minEvictableIdleTimeMillis and timeBetweenEvictionRunsMillis項 )
maxActive=”20″
validationQuery=”select 1″/>
注:以上“l(fā)ocalhost”可不該,也可改為主機名或設為”主機IP:端口“,mysql端口號為”3306“。
b)修改entityengine.xml (路徑:/jira/atlassian-jira/WEB-INF/classes/entityengine.xml)
第100行修改為:
<datasource name=”defaultDS” field-type-name=”mysql”
刪除schema-name=”P(pán)UBLIC”
4、安裝連接驅動(dòng)包 Mysql JDBC Driver
cp mysql-connector-java-5.1.7-bin.jar /jira/common/lib/
5、啟動(dòng)JIRA服務(wù) 。
現在JIRA的數據庫已經(jīng)是MySQL了。
如果希望更進(jìn)一步,將JIRA服務(wù)的依賴(lài)服務(wù)中加上MySQL服務(wù),可以在注冊表中更新
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\JIRA240209102746
JIRA240209102746由于是JIRA服務(wù)名太長(cháng)而在注冊表中隨機生成的名字,在基中添加一個(gè)DependOnService多文本鍵值,把MySQL服務(wù)名添加進(jìn)去就行了
這樣的結果是JIRA依賴(lài)于MySQL,JIRA會(huì )在MySQL啟動(dòng)后啟動(dòng),如果MySQL停止,JIRA會(huì )先于MySQL停止。
文章來(lái)源于領(lǐng)測軟件測試網(wǎng) http://kjueaiud.com/