Documentation for JIRA 4.3. Documentation for other versions of JIRA is available too. 
![]()
This section describes how to install JIRA on Tomcat 6.0, a popular open-source server from the Apache Jakarta project.
Tomcat can be downloaded from the Apache site.
このページの内容
Please read the following important notes before you begin installing JIRA on Tomcat 6.0:
We also strongly recommend that you do not deploy multiple Atlassian applications in a single Tomcat container for a number of practical reasons. Firstly, you will need to shut down Tomcat to upgrade any application and secondly, if one application crashes, the other applications running in the Tomcat container will be inaccessible.
A new directory containing JIRA will be created, hereafter referred to as $JIRA_INSTALL.
$ sudo /usr/sbin/useradd --create-home --home-dir /usr/local/jira --shell /bin/bash jira
To maximise security, ensure that this user can only write to the JIRA directories (not to the entire file system).
JIRA needs to be told what type of database you'll be using. The database is specified in $JIRA_INSTALL/edit-webapp/WEB-INF/classes/entityengine.xml . Locate the <datasource> tag near the bottom, and change the field-type-name attribute value. See the relevant setup guide for your database to find out what value should be used for field-type-name:
<datasource name="defaultDS"
field-type-name="hsql"
schema-name="PUBLIC"
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">
<jndi-jdbc jndi-server-name="default"
jndi-name="java:comp/env/jdbc/JiraDS" />
</datasource>
For PostgreSQL 7.3+, you also need to set a schema-name attribute. Refer to Connecting JIRA to PostgreSQL for details.
Also in entityengine.xml , ensure the <transaction-factory>...</transaction-factory> tag contains:
<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>
More details on JIRA's database access layer are available on the EntityEngine configuration page.
jira-application.properties file (see the JIRA Installation Directory page to find where this file is located), add a 'jira.home' property and set it to your desired location for the JIRA home directory. Please use forward-slashes ("/"), not back-slashes ("\").JIRA_HOME in your operating system whose value is the location of your JIRA home directory. To do this:
export JIRA_HOME = /path/to/jira/homeset JIRA_HOME = X:\\path\\to\\jira\\home複数の JIRA インスタンスが動いているときに、同じ JIRA ホームディレクトリを使うことはできません。JIRA ホームディレクトリは、JIRA インストールディレクトリとは完全に独立した場所(つまり一方がもう一方のディレクトリにネストされていない)にすることを推奨します。これにより、主要なオペレーション(インスタンスのバックアップ・リストアなど)の際にデータを失うリスクがなくなります。
Now build JIRA by typing build (Windows) or ./build.sh (Unix) on the command line in the $JIRA_INSTALL directory. This will produce the deployable WAR file in the $JIRA_INSTALL/dist-tomcat/tomcat-6 directory.
Tomcat does not come with some libraries required to run JIRA. To fix this, download http://downloads.atlassian.com/software/jira/downloads/jira-jars-tomcat-distribution-4.3-tomcat-6x.zip and copy the contained jars to Tomcat's lib/ directory. (Be sure to remove existing versions of these JAR before copying the new ones.)
/lib/ directory. Also ensure that these files are not present in Tomcat's webapps/jira/WEB-INF/lib directory.Additionally, if you are running Sun's distribution of Tomcat, download tomcat-dbcp.jar and copy it to the tomcat6/lib directory.
A JIRA 'context' now needs to be set up in Tomcat. To do this:
Catalina/localhost/ directory in Tomcat's conf/ directory.Customise the copied jira.xml as follows:
<Context path="/jira" docBase="path/to/atlassian-jira-4.1.war">
<Resource name="jdbc/JiraDS" auth="Container" type="javax.sql.DataSource"
username="sa"
password=""
driverClassName="org.hsqldb.jdbcDriver"
url="jdbc:hsqldb:path/to/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>
The paths (denoted as path/to/) will be correct by default, assuming you want to deploy the .war from the dist-tomcat/tomcat-6 directory.
注意
If you are not using hsqldb, make sure you comment out the minEvictableIdleTimeMillis and timeBetweenEvictionRunsMillis params, or JIRA will run slower than normal.
If you are installing in Windows, make sure that the paths you specify for the location of the WAR file and database are full paths with drive letters (e.g. c:\yourdb\tomcatdb). N.B. the last part of the path is the name of the database and is not a directory.The above example assumes you are using hsql (an in-memory database - a good choice for evaluation purposes). Here is an example using MySQL:
<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>
Notice the lack of minEvictableIdleTimeMillis and timeBetweenEvictionRunsMillis parameters — those should only be used with hsql.
CATALINA_HOME/lib/ (see the database configuration guide ); andIn order for JIRA to correctly display internationalised characters in user and group names you need to modify your Tomcat distributions conf/server.xml file. You need to set the property URIEncoding="UTF-8" within the connector definition for your http protocol. The connector block should look very much like this:
<Connector port="8080" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="8443"/>
You should modify the block to contain the addition of the URIEncoding property:
<Connector port="8080" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="8443" URIEncoding="UTF-8"/>
注意
Because you must define this property in at the connector level this setting will effect all web-applications you have deployed under the connector. This should not adversely effect the other web-applications but please be aware of this. JIRA will run fine without this property set but you will run into issues if a user or group is created which contains international characters. It is best to set this property to true.
Tomcat has a memory leak where large JSP page requests can fill up memory. JIRA also requires more memory than what is available by default or you may see OutOfMemory errors. Finally there's also a parameter that needs to be set in order for the JIRA mail handler to work correctly with emails from RFC 2231-compliant mail clients. To avoid any of these issues:
Windows の場合
If you haven´t installed Tomcat as a service, edit Tomcat's bin/setenv.bat(create it if it does not exist) and set:
set CATALINA_OPTS=%CATALINA_OPTS% -Dorg.apache.jasper.runtime.BodyContentImpl.LIMIT_BUFFER=true -Dmail.mime.decodeparameters=true -Xms128m -Xmx512m -XX:MaxPermSize=256m
if you running Tomcat 6 as service, right click the tomcat system tray icon and select "Configure..."
Now click on the Java tab and enter the following values
フィールド | 値 |
|---|---|
Java Options (既存値に追加する) | -Dorg.apache.jasper.runtime.BodyContentImpl.LIMIT_BUFFER=true |
初期メモリプール | 128 |
最大メモリプール | 512 |
下記スクリーンショットに類似した設定になるはずです:
Linux の場合
Edit Tomcat's bin/setenv.sh (create it if it does not exist) and set:
export CATALINA_OPTS="$CATALINA_OPTS -Dorg.apache.jasper.runtime.BodyContentImpl.LIMIT_BUFFER=true -Dmail.mime.decodeparameters=true -Xms128m -Xmx512m -XX:MaxPermSize=256m"
For other environments, and for more info on memory settings, see the memory settings page.
JIRA should now be ready to run in Tomcat. To start using JIRA, first start (or restart) the Tomcat server with Tomcat's bin/startup.(sh|bat) scripts, and point your browser to http://localhost:8080/jira
You should now see the Setup Wizard, which will take you through the brief setup procedure.
It is easy to make a mistake in this process, and even more so if you are trying to connect to a database other than hsqldb. First, check that you have followed the process described above:
webapps/jira directory, then restart JIRA. It would seem that in some circumstances Tomcat does not correctly re-expand the web application.CATALINA_HOME/lib/objectweb-datasource-1.4.3.jar present.CATALINA_HOME/lib/? (Refer to the Connecting JIRA to a Database section for more information)startup.bat , or in one of the log files in the logs/ directory. On Linux/Unix, logs will appear in a log file in logs/ , usually logs/* (not just logs/catalina.out!). Check the log file for errors after startup.-Dorg.apache.jasper.runtime.BodyContentImpl.LIMIT_BUFFER=true in setenv.sh / setenv.bat. This property is only valid for Tomcat 5.5.15 and later. For more information please see JRA-10145.build.xml file is an Ant file, which when invoked with the build.(sh|bat) script, will construct a deployable webapp. The build.xml file does this by copying the contents of the webapp/ directory, and overwriting it with the contents of edit-webapp/. Thus, never edit files in the webapp/ directory! If a file needs editing, first copy it from webapp/path/to/file to edit-webapp/path/to/file, and edit it there.If you're stuck, please raise a support request, and attach your logs, configuration files, plus anything else relevant, and we'll get back to you as soon as possible.