JIRA 4.0 : Installing JIRA on Tomcat 5.5
This page last changed on Sep 09, 2009 by alui.
This section describes how to install JIRA on Tomcat 5.5, a popular open-source server from the Apache Jakarta project. Tomcat can be downloaded the Apache site.
1. Unpack JIRADownload and unzip JIRA (but not with XP's unzipper nor the default tar utility on Solaris). Ensure that you download the WAR/EAR version, not the Standalone version that is recommended on the Downloads page.
A new directory containing JIRA will be created, hereafter referred to as $JIRA_INSTALL.
{} 2. Configure JIRA2.1 Database ConnectionJIRA 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: <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> Possible values include cloudscape, db2, firebird, hsql, mckoidb, mysql, mssql, oracle, postgres, postgres72, sapdb, and sybase For PostgreSQL 7.3+ and DB2 you also need to set a schema-name attribute (see the PostgreSQL and DB2 pages). 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. 2.2 Set JIRA HomeTo specify the location of your JIRA Home Directory (note that you need to do this before you build JIRA):
You can specify any location on a disk for your JIRA home directory. Please be sure to specify an absolute path. Please note that you cannot use the same JIRA home directory for multiple instances of JIRA. We recommend that you do not specify your JIRA home directory inside your installation directory, to prevent information from being accidentally lost during major operations (e.g. backing up and restoring instances). 3. Build JIRANow 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 directory. 4. Update Tomcat LibrariesTomcat does not come with some libraries required to run JIRA. To fix this, download jira-jars-tomcat5.zip (1.2Mb), and copy the contained jars to Tomcat's common/lib/ directory. 5. Configure TomcatA JIRA 'context' now needs to be set up in Tomcat. To do this:
6. Modify Tomcat server.xmlIn 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" maxHttpHeaderSize="8192" maxThreads="150" minSpareThreads="25" maxSpareThreads="75" enableLookups="false" redirectPort="8443" acceptCount="100" connectionTimeout="20000" disableUploadTimeout="true"/> You should modify the block to contain the addition of the URIEncoding property: <Connector port="8080" maxHttpHeaderSize="8192" maxThreads="150" minSpareThreads="25" maxSpareThreads="75" enableLookups="false" redirectPort="8443" acceptCount="100" connectionTimeout="20000" disableUploadTimeout="true" URIEncoding="UTF-8"/>
7. Fix Tomcat memory settings
Tomcat has a memory leak where large JSP page requests can fill up memory. To avoid this, 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" or when installed as a Windows service, run: tomcat5 //US//JIRA ++JvmOptions="-Dorg.apache.jasper.runtime.BodyContentImpl.LIMIT_BUFFER=true For other environments, and for more info on memory settings, see the memory settings page. 8. Set mail.mime.decodeparametersThe following system property must be set in order for the JIRA mail handler to work correctly with emails from RFC 2231-compliant mail clients: mail.mime.decodeparameters=true System properties are set in different ways depending on your application server. 9. Start TomcatJIRA 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. TroubleshootingIt 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:
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. If you have a general question, please try the jira-user mailing list (which Atlassian staff monitor). User-contributed notesHave experiences to share with Tomcat 5.5.x and JIRA? We welcome your thoughts. Please see the user-contributed Tomcat 5.5.x notes. |
![]() |
Document generated by Confluence on Oct 06, 2009 00:26 |