jira war安装

2011-05-20 02:01 32 appendcp.bat
2011-05-20 02:01 238 build.bat
2011-05-20 02:01 502 build.sh
2011-05-20 02:01 9,139 build.xml
2011-08-19 17:07 <DIR> dist-generic
2011-08-19 17:10 <DIR> dist-tomcat
2011-05-20 02:01 <DIR> edit-webapp
2011-05-20 02:01 <DIR> etc
2011-08-19 16:58 <DIR> lib
2011-05-20 02:00 <DIR> licenses
2011-05-20 02:01 5,038 readme.txt
2011-05-20 02:01 <DIR> src
2011-08-19 17:03 <DIR> tmp
2011-05-20 02:01 <DIR> tools
2011-05-20 01:57 <DIR> updater
2011-05-20 02:00 <DIR> webapp
以上是war形式的目录结构
build.xml不用说是ant的构建文件了。
build会复制webapp的目录,并用edit-webapp目录下面的内容复制到webapp的内容。因此修改webapp的内容之前需要将其复制到edit-webapp(当然也包括要修改的文件的目录结构),然后修改。

数据库配置
jira将ofbiz的entity引擎独立出来了,牛叉啊,佩服啊。既然使用了ofbiz的实体引擎,那么数据库配置当然属于ofbiz一样的了。
在edit-webapp下面的classes有一个entityengine.xml,是不是文件名都和ofbiz的实体引擎一样啦。
打开,内容和ofbiz的实体引擎基本差不多


<?xml version="1.0" encoding="UTF-8" ?>
<entity-config>
<resource-loader name="maincp" class="org.ofbiz.core.config.ClasspathLoader"/>
<transaction-factory class="org.ofbiz.core.entity.transaction.JNDIFactory">
<user-transaction-jndi jndi-server-name="default" jndi-name="java:comp/env/UserTransaction"/>
<transaction-manager-jndi jndi-server-name="default" jndi-name="java:comp/env/UserTransaction"/>
</transaction-factory>

<delegator name="default" entity-model-reader="main" entity-group-reader="main">
<!--幸好学了点ofbiz,一眼就能看出它指定的datasource-name是defaultDS
直接跑到defaultDS数据源去-->
<group-map group-name="default" datasource-name="defaultDS"/>
</delegator>

<entity-model-reader name="main">
<resource loader="maincp" location="entitydefs/entitymodel.xml"/>
</entity-model-reader>

<entity-group-reader name="main" loader="maincp" location="entitydefs/entitygroup.xml"/>

<field-type name="cloudscape" loader="maincp" location="entitydefs/fieldtype-cloudscape.xml"/>
<field-type name="firebird" loader="maincp" location="entitydefs/fieldtype-firebird.xml"/>
<field-type name="hsql" loader="maincp" location="entitydefs/fieldtype-hsql18.xml"/>
<field-type name="mckoidb" loader="maincp" location="entitydefs/fieldtype-mckoidb.xml"/>
<field-type name="mysql" loader="maincp" location="entitydefs/fieldtype-mysql.xml"/>
<field-type name="mssql" loader="maincp" location="entitydefs/fieldtype-mssql.xml"/>
<field-type name="oracle" loader="maincp" location="entitydefs/fieldtype-oracle.xml"/>
<field-type name="oracle10g" loader="maincp" location="entitydefs/fieldtype-oracle10g.xml"/>
<field-type name="postgres" loader="maincp" location="entitydefs/fieldtype-postgres.xml"/>
<field-type name="postgres72" loader="maincp" location="entitydefs/fieldtype-postgres72.xml"/> <!-- use for postgres 7.2 and above -->
<field-type name="sapdb" loader="maincp" location="entitydefs/fieldtype-sapdb.xml"/>
<field-type name="sybase" loader="maincp" location="entitydefs/fieldtype-sybase.xml"/>
<field-type name="db2" loader="maincp" location="entitydefs/fieldtype-db2.xml"/>
<field-type name="frontbase" loader="maincp" location="entitydefs/fieldtype-frontbase.xml"/>
<!--field-type-name="mysql"使用mysql数据库没意见吧?-->
<!--删除schema-name="PUBLIC"属性,这个属性是PostgreSQL 7.3数据库才需要-->
<datasource name="defaultDS" field-type-name="mysql"
helper-class="org.ofbiz.core.entity.GenericHelperDAO"
check-on-start="true"
use-foreign-keys="false"
use-foreign-key-indices="false"
check-fks-on-start="false"
check-fk-indices-on-start="false"
add-missing-on-start="true"
check-indices-on-start="true">
<jndi-jdbc jndi-server-name="default" jndi-name="java:comp/env/jdbc/JiraDS"/>
</datasource>
</entity-config>


指定home目录
编辑edit-webapp\WEB-INF\classes\jira-application.properties文件
设置jira.home属性,我设置的是jira.home = D:/jira/jira-home

由于部分jar架包在tomcat和jira war的lib下面都没有,因此需要下载http://downloads.atlassian.com/software/jira/downloads/jira-jars-tomcat-distribution-4.3-tomcat-6x.zip
网上说法是将下载的包拷贝到tomcat的lib,个人不建议这么做,既然前面说的edit-webapp的会覆盖到webapp目录,那么拷贝到edit-webapp的WEB-INF/lib目录即可。

运行build.bat
会在dist-tomcat目录生成不同版本的tomcat运行库和配置信息,我是tomcat6

配置tomcat
在tomcat的conf\Catalina\localhost目录
dist-tomcat/tomcat-6/jira.xml文件拷贝过来
文件内容大概如下

<!--
A sample configuration file for Tomcat 6
Customize the docBase attribute, drop in your $CATALINA_HOME/conf/Catalina/localhost/jira.xml
Note the JOTM dependencies; you'll need to copy various jars to Tomcat's common/lib/ directory.
-->
<Context path="/jira" docBase="D:\jira\atlassian-jira-4.3.4-war\dist-tomcat\tomcat-6\atlassian-jira-4.3.4.war" debug="0" useHttpOnly="true">

<!-- NOTE: If you use a database other than hsqldb:
* delete the minEvictableIdleTimeMillis and timeBetweenEvictionRunsMillis attributes
* change the database type in atlassian-jira/WEB-INF/classes/entityengine.xml
-->
<Resource name="jdbc/JiraDS" auth="Container" type="javax.sql.DataSource"
username="sa"
password=""
driverClassName="org.hsqldb.jdbcDriver"
url="jdbc:hsqldb:D:\jira\atlassian-jira-4.3.4-war/database/jiradb"
minEvictableIdleTimeMillis="4000"
timeBetweenEvictionRunsMillis="5000"/>

<Resource name="UserTransaction" auth="Container" type="javax.transaction.UserTransaction"
factory="org.objectweb.jotm.UserTransactionFactory" jotm.timeout="60"/>
<Manager pathname=""/>

</Context>


minEvictableIdleTimeMillis 属性和
timeBetweenEvictionRunsMillis 属性如果在不使用HSQLDB,则应该删除,因为在不使用这个数据库的时候,写上这两个属性会造成速度减慢。


修改以上文件,改成自己的信息,如
<Context path="/jira" docBase="path/to/atlassian-jira-4.0.war">
<Resource name="jdbc/JiraDS" auth="Container" type="javax.sql.DataSource" username="jirauser"
password="mypassword"
driverClassName="com.mysql.jdbc.Driver"
url="jdbc:mysql://localhost/jiradb?useUnicode=true&characterEncoding=UTF8" maxActive="20" validationQuery="select 1"/>
<Resource name="UserTransaction" auth="Container" type="javax.transaction.UserTransaction" factory="org.objectweb.jotm.UserTransactionFactory" jotm.timeout="60"/>
<Manager pathname=""/>
</Context>
注意这里的jdbc:mysql://localhost/jiradb?useUnicode=true&characterEncoding=UTF8使用了转义符。

修改Tomcat server.xml配置
<Connector port="8080"protocol="HTTP/1.1" connectionTimeout="20000" redirectPort="8443"URIEncoding="UTF-8"/>这里指定的tomcat的url编码。


jira论坛http://www.fangwai.net/bbs/forum-1-1.html
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值