`
liyixing1
  • 浏览: 939508 次
  • 性别: Icon_minigender_1
  • 来自: 江西上饶
社区版块
存档分类
最新评论

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&amp;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&amp;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
分享到:
评论
5 楼 liyixing1 2014-12-30  
PandaDONG 写道
谢谢你啊,我已经下下来了,只是还有很多东西不懂,想向您请教:

通过您的文章我是这样理解的:

1.下载下来的war文件(atlassian-jira-6.3.12-war.tar.gz)这种类型的文件,我上传到liunx服务器上的tomcat下的webapps目录下,然后解压,将webapp下的文件都copy到edit-webapp下,然后修改数据配置(不过看了好像不用修改),让后运行build.bat,之后直接启动tomcat就可以访问了么

2.我之前安装过jira不过是安装版的,他是在界面上配置的jira数据连接,让后自动配置数据库的

3.汉化的需要替换哪些个jar文件啊






我没有试汉化,具体怎么汉化可以上jira汉化插件的帮助文档看看
4 楼 liyixing1 2014-12-30  
PandaDONG 写道
谢谢你啊,我已经下下来了,只是还有很多东西不懂,想向您请教:

通过您的文章我是这样理解的:

1.下载下来的war文件(atlassian-jira-6.3.12-war.tar.gz)这种类型的文件,我上传到liunx服务器上的tomcat下的webapps目录下,然后解压,将webapp下的文件都copy到edit-webapp下,然后修改数据配置(不过看了好像不用修改),让后运行build.bat,之后直接启动tomcat就可以访问了么

2.我之前安装过jira不过是安装版的,他是在界面上配置的jira数据连接,让后自动配置数据库的

3.汉化的需要替换哪些个jar文件啊







tomcat的conf里面弄一个应用文件,把路径指向你的目录。
3 楼 PandaDONG 2014-12-30  
谢谢你啊,我已经下下来了,只是还有很多东西不懂,想向您请教:

通过您的文章我是这样理解的:

1.下载下来的war文件(atlassian-jira-6.3.12-war.tar.gz)这种类型的文件,我上传到liunx服务器上的tomcat下的webapps目录下,然后解压,将webapp下的文件都copy到edit-webapp下,然后修改数据配置(不过看了好像不用修改),让后运行build.bat,之后直接启动tomcat就可以访问了么

2.我之前安装过jira不过是安装版的,他是在界面上配置的jira数据连接,让后自动配置数据库的

3.汉化的需要替换哪些个jar文件啊





2 楼 liyixing1 2014-12-30  
PandaDONG 写道
官网上打不开下载页面,有没有linux war文件啊,给我一份啊


没有,我都是要用的时候去下载的,打不开可以fan了个墙试试。

https://www.atlassian.com/software/jira/download

它本身就是java写的,跨平台的,不分linux或者windows
1 楼 PandaDONG 2014-12-29  
官网上打不开下载页面,有没有linux war文件啊,给我一份啊

相关推荐

Global site tag (gtag.js) - Google Analytics