jira开发 连接mysql数据库
ira系统启动默认连接内置的h2数据库,如果需要使用其他类型的数据库,需要修改数据配置,并放入相应的驱动jar包
数据库配置文件目录target/jira/home/dbconfig.xml
驱动jar目录target/container/tomcat8x/apache-tomcat-8.0.36/lib/*.jar
连接一个新的数据库,需要到attlassian的官网上申请一个试用的license key(申请过程中,如果有页面加载超时,需连接vpn),有效期为一个月
Atlassian JIRA 如何从数据库备份导入项目数据?
原有一台 JIRA 服务器,数据放在另外一台的MySQL里;现在 JIRA 服务器挂了,JIRA 服务器上的东西都丢了,没有备份,只剩下数据库。于是重新搭建 JIRA,链接原来的数据库,但是用户登陆以后却看不到之前的项目数据,项目里面也是空的。
JIRA 页面显示的 Issue 不是直接查询数据库的,是通过 JIRA 本地的 Lucence 去查询数据,只需要 ReIndex 一下,生成索引就可以了。
路劲:System--》ADVANCED(indexing)
地址:secure/admin/IndexAdmin.jspa
jira连接mysql数据库,dbconfig配置
<?xml version="1.0" encoding="UTF-8"?> <jira-database-config> <name>defaultDS</name> <delegator-name>default</delegator-name> <database-type>mysql</database-type> <jdbc-datasource> <url>jdbc:mysql://localhost:3306/jiradb</url> <driver-class>com.mysql.jdbc.Driver</driver-class> <username>root</username> <password>root</password> <pool-min-size>20</pool-min-size> <pool-max-size>20</pool-max-size> <pool-max-wait>30000</pool-max-wait> <validation-query>select 1</validation-query> <min-evictable-idle-time-millis>60000</min-evictable-idle-time-millis> <time-between-eviction-runs-millis>300000 </time-between-eviction-runs-millis> <pool-max-idle>20</pool-max-idle> <pool-remove-abandoned>true</pool-remove-abandoned> <pool-remove-abandoned-timeout>300</pool-remove-abandoned-timeout> <pool-test-while-idle>true</pool-test-while-idle> <validation-query-timeout>3</validation-query-timeout> </jdbc-datasource> </jira-database-config>
jira连接oracle数据库,dbconfig配置
<?xml version="1.0" encoding="UTF-8"?> <jira-database-config> <name>defaultDS</name> <delegator-name>default</delegator-name> <database-type>oracle10g</database-type> <jdbc-datasource> <url>jdbc:oracle:thin:@192.168.70.83:1521:ORCL</url> <driver-class>oracle.jdbc.driver.OracleDriver</driver-class> <username>scott</username> <password>Sn314159_</password> <pool-min-size>20</pool-min-size> <pool-max-size>20</pool-max-size> <pool-max-wait>30000</pool-max-wait> <pool-max-idle>20</pool-max-idle> <pool-remove-abandoned>true</pool-remove-abandoned> <pool-remove-abandoned-timeout>300</pool-remove-abandoned-timeout> <validation-query>select 1 from dual</validation-query> <min-evictable-idle-time-millis>60000</min-evictable-idle-time-millis> <time-between-eviction-runs-millis>300000</time-between-eviction-runs-millis> <pool-test-while-idle>true</pool-test-while-idle> <pool-test-on-borrow>false</pool-test-on-borrow> </jdbc-datasource> </jira-database-config>
jira连接PostgreSQL数据库,dbconfig配置
<?xml version="1.0" encoding="UTF-8"?> <jira-database-config> <name>defaultDS</name> <delegator-name>default</delegator-name> <database-type>postgres72</database-type> <jdbc-datasource> <url>jdbc:postgresql://localhost:5432/DsdCommon</url> <driver-class>org.postgresql.Driver</driver-class> <username>postgres</username> <password>root</password> <pool-min-size>20</pool-min-size> <pool-max-size>20</pool-max-size> <pool-max-wait>30000</pool-max-wait> <validation-query>select 1</validation-query> <min-evictable-idle-time-millis>60000</min-evictable-idle-time-millis> <time-between-eviction-runs-millis>300000 </time-between-eviction-runs-millis> <pool-max-idle>20</pool-max-idle> <pool-remove-abandoned>true</pool-remove-abandoned> <pool-remove-abandoned-timeout>300</pool-remove-abandoned-timeout> <pool-test-while-idle>true</pool-test-while-idle> <validation-query-timeout>3</validation-query-timeout> </jdbc-datasource> </jira-database-config>
jira连接sqlserver数据库,dbconfig配置
<?xml version="1.0" encoding="UTF-8"?> <jira-database-config> <name>defaultDS</name> <delegator-name>default</delegator-name> <database-type>mssql</database-type> <schema-name>dbo</schema-name> <jdbc-datasource> <url>jdbc:jtds:sqlserver://192.168.70.109:1433/jiraDB</url> <driver-class>net.sourceforge.jtds.jdbc.Driver</driver-class> <username>sa</username> <password>dsd123456</password> <!--ӔЂӎ˽ࠉӔһԃƤ׃ --> <pool-min-size>20 </pool-min-size> <pool-max-size>20</pool-max-size> <pool-max-wait>30000</pool-max-wait> <validation-query>select 1</validation-query> <min-evictable-idle-time-millis>60000</min-evictable-idle-time-millis> <time-between-eviction-runs-millis>300000 </time-between-eviction-runs-millis> <pool-max-idle>20</pool-max-idle> <pool-remove-abandoned>true</pool-remove-abandoned> <pool-remove-abandoned-timeout>300</pool-remove-abandoned-timeout> <pool-test-while-idle>true</pool-test-while-idle> <validation-query-timeout>3</validation-query-timeout> </jdbc-datasource> </jira-database-config>