1、JDK、JIRA、MySQL安装完毕,停止JIRA服务
创建数据库:
mysql
create database jiradb character set ‘UTF8′;
mysql
create database jiradb character set ‘UTF8′;
创建用户并赋与权限:
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;
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;
identified by ‘jira’这个是设置jirauser的密码
2、修改JIRA端口
JIRA是集成在Tomcat上面的,所以修改端口的方法和Tomcat修改端口的方法是一样的。
3、JIRA默认使用的数据库是HSql,如果要迁移到MySQL,可以通过以下的配置改动。
1)修改server.xml (路径:/jira/conf rver.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″
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″/>
注:以上“localhost”可不该,也可改为主机名或设为”主机IP:端口“,mysql端口号为”3306“。
b)修改entityengine.xml (路径:/jira/atlassian-jira/WE
fanweitao(范伟涛) 2010-03-24 19:40:58
B-INF/classes/entityengine.xml)
fanweitao(范伟涛) 2010-03-24 19:40:58
B-INF/classes/entityengine.xml)
第100行修改为:
<datasource name=”defaultDS” field-type-name=”mysql”
删除schema-name=”PUBLIC”
<datasource name=”defaultDS” field-type-name=”mysql”
删除schema-name=”PUBLIC”
4、安装连接驱动包 Mysql JDBC Driver
cp mysql-connector-java-5.1.7-bin.jar /jira/common/lib/
5、启动JIRA服务 。
现在JIRA的数据库已经是MySQL了。
如果希望更进一步,将JIRA服务的依赖服务中加上MySQL服务,可以在注册表中更新
HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Services/JIRA240209102746
JIRA240209102746由于是JIRA服务名太长而在注册表中随机生成的名字,在基中添加一个DependOnService多文本键值,把MySQL服务名添加进去就行了
这样的结果是JIRA依赖于MySQL,JIRA会在MySQL启动后启动,如果MySQL停止,JIRA会先于MySQL停止。