Difference between revisions of "JIRA"

From Briki
Jump to: navigation, search
 
(15 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
== Configure a new JIRA war instance for mysql and tomcat ==
 
== Configure a new JIRA war instance for mysql and tomcat ==
* Extract tar.gz file to /opt (eg. /opt/atlassian-jira-enterprise-3.11)
+
Some more details here: http://confluence.atlassian.com/display/JIRA/Installing+JIRA+on+Tomcat+6.0. Note in the instructions below that you should only ever edit files in ''edit-webapp'' (not ''webapp'' since they will be overwritten).
* '''sudo cp /media/old/opt/atlassian-jira-enterprise-3.9.1/webapp/WEB-INF/classes/entityengine.xml /opt/atlassian-jira-enterprise-3.11/webapp/WEB-INF/classes/entityengine.xml'''
+
 
* Edit ''/opt/atlassian-jira-enterprise-3.11/webapp/WEB-INF/classes/entityengine.xml'' and change:
+
=== Prepare Tomcat ===
 +
* Edit ''/etc/defaults/tomcat6'' and add:
 +
<pre>
 +
JAVA_OPTS="-Dorg.apache.jasper.runtime.BodyContentImpl.LIMIT_BUFFER=true \
 +
          -Dmail.mime.decodeparameters=true -Xms128m -Xmx512m -XX:MaxPermSize=256m"
 +
</pre>
 +
* Either edit ''/etc/default/tomcat6'' and set '''TOMCAT6_SECURITY=no''' or go through the pain of getting the security policy all setup
 +
* Install libmysql-java and '''sudo ln -s /usr/share/java/mysql-connector-java-5.1.6.jar /usr/share/tomcat6/lib/'''
 +
* Login to mysql as root, and '''create database jira; grant all on jira.* to jira@localhost identified by 'jira';'''
 +
* Download ''http://www.atlassian.com/software/jira/docs/servers/jars/v1/jira-jars-tomcat6.zip'', extract, and copy extracted jars to ''/usr/share/tomcat6/lib/''
 +
* '''sudo mkdir /var/lib/jira; sudo chown tomcat6:tomcat6 /var/lib/jira'''
 +
 
 +
=== Create war ===
 +
* Extract tar.gz file to /opt (eg. /opt/atlassian-jira-enterprise-4.0.1)
 +
* Edit ''/opt/atlassian-jira-enterprise-4.0.1/edit-webapp/WEB-INF/classes/jira-application.properties'' and set '''jira.home=/var/lib/jira'''
 +
* Edit ''/opt/atlassian-jira-enterprise-4.0.1/edit-webapp/WEB-INF/classes/entityengine.xml'' and change:
 
<pre>
 
<pre>
 
     <datasource name="defaultDS" field-type-name="hsql"
 
     <datasource name="defaultDS" field-type-name="hsql"
Line 11: Line 26:
 
     <datasource name="defaultDS" field-type-name="mysql"
 
     <datasource name="defaultDS" field-type-name="mysql"
 
</pre>
 
</pre>
* '''sudo cp /opt/atlassian-jira-enterprise-3.11/etc/tomcat-5.5-jira.xml  /var/lib/tomcat5.5/conf/Catalina/localhost/jira.xml'''
+
* From ''/opt/atlassian-jira-enterprise-4.0.1'', run '''sudo chmod u+x build.sh; sudo ./build.sh war'''
* Edit ''/var/lib/tomcat5.5/conf/Catalina/localhost/jira.xml''
+
 
** Set ''@JIRA_WEBAPP@'' = /opt/atlassian-jira-enterprise-3.11/dist-tomcat/atlassian-jira-3.11.war
+
=== Create webapp descriptor ===
 +
* Edit ''/opt/atlassian-jira-enterprise-4.0.1/etc/tomcat-6-jira.xml''
 +
** Set ''@JIRA_WEBAPP@'' = /opt/atlassian-jira-enterprise-4.0.1/dist-tomcat/atlassian-jira-4.0.1.war
 
** Delete the resource named ''jdbc/JiraDS'', and replace with:
 
** Delete the resource named ''jdbc/JiraDS'', and replace with:
 
<pre>
 
<pre>
Line 20: Line 37:
 
           password="jira"
 
           password="jira"
 
           driverClassName="com.mysql.jdbc.Driver"
 
           driverClassName="com.mysql.jdbc.Driver"
           url="jdbc:mysql://localhost/jira?autoReconnect=true&amp;useUnicode=true&amp;characterEncoding=UTF8"/>
+
           url="jdbc:mysql://localhost/jira?autoReconnect=true&amp;amp;useUnicode=true&amp;amp;characterEncoding=UTF8"/>
 
</pre>
 
</pre>
* From ''/opt/atlassian-jira-enterprise-3.11'', run '''sudo ./build.sh war'''
+
* '''sudo ln -s /opt/atlassian-jira-enterprise-4.0.1/etc/tomcat-6-jira.xml  /etc/tomcat6/Catalina/localhost/jira.xml'''
* Either edit ''/etc/default/tomcat5.5'' and set '''TOMCAT5_SECURITY=no''' or go through the pain of getting the security policy all setup
+
 
* Install libmysql-java and '''sudo ln -s /usr/share/java/mysql-connector-java-5.0.4.jar /usr/share/tomcat5.5/common/lib/'''
 
* Login to mysql as root, and '''create database jira; grant all on jira.* to jira@localhost identified by 'jira';'''
 
* Download ''http://www.atlassian.com/software/jira/docs/servers/jars/v1/jira-jars-tomcat5.zip'', extract, and copy extracted jars to ''/usr/share/tomcat5.5/common/lib/''
 
 
* Restart tomcat and cross your fingers
 
* Restart tomcat and cross your fingers
 +
 +
== Configure a file/email watcher ==
 +
See: http://confluence.atlassian.com/display/JIRA/Creating+Issues+and+Comments+from+Email and http://confluence.atlassian.com/display/JIRA/Services#Services-BuiltinServices

Latest revision as of 14:35, 8 February 2010

Configure a new JIRA war instance for mysql and tomcat

Some more details here: http://confluence.atlassian.com/display/JIRA/Installing+JIRA+on+Tomcat+6.0. Note in the instructions below that you should only ever edit files in edit-webapp (not webapp since they will be overwritten).

Prepare Tomcat

  • Edit /etc/defaults/tomcat6 and add:
JAVA_OPTS="-Dorg.apache.jasper.runtime.BodyContentImpl.LIMIT_BUFFER=true \
           -Dmail.mime.decodeparameters=true -Xms128m -Xmx512m -XX:MaxPermSize=256m"
  • Either edit /etc/default/tomcat6 and set TOMCAT6_SECURITY=no or go through the pain of getting the security policy all setup
  • Install libmysql-java and sudo ln -s /usr/share/java/mysql-connector-java-5.1.6.jar /usr/share/tomcat6/lib/
  • Login to mysql as root, and create database jira; grant all on jira.* to jira@localhost identified by 'jira';
  • Download http://www.atlassian.com/software/jira/docs/servers/jars/v1/jira-jars-tomcat6.zip, extract, and copy extracted jars to /usr/share/tomcat6/lib/
  • sudo mkdir /var/lib/jira; sudo chown tomcat6:tomcat6 /var/lib/jira

Create war

  • Extract tar.gz file to /opt (eg. /opt/atlassian-jira-enterprise-4.0.1)
  • Edit /opt/atlassian-jira-enterprise-4.0.1/edit-webapp/WEB-INF/classes/jira-application.properties and set jira.home=/var/lib/jira
  • Edit /opt/atlassian-jira-enterprise-4.0.1/edit-webapp/WEB-INF/classes/entityengine.xml and change:
    <datasource name="defaultDS" field-type-name="hsql"
       schema-name="PUBLIC"

to

    <datasource name="defaultDS" field-type-name="mysql"
  • From /opt/atlassian-jira-enterprise-4.0.1, run sudo chmod u+x build.sh; sudo ./build.sh war

Create webapp descriptor

  • Edit /opt/atlassian-jira-enterprise-4.0.1/etc/tomcat-6-jira.xml
    • Set @JIRA_WEBAPP@ = /opt/atlassian-jira-enterprise-4.0.1/dist-tomcat/atlassian-jira-4.0.1.war
    • Delete the resource named jdbc/JiraDS, and replace with:
<Resource name="jdbc/JiraDS" auth="Container" type="javax.sql.DataSource"
          username="jira"
          password="jira"
          driverClassName="com.mysql.jdbc.Driver"
          url="jdbc:mysql://localhost/jira?autoReconnect=true&amp;useUnicode=true&amp;characterEncoding=UTF8"/>
  • sudo ln -s /opt/atlassian-jira-enterprise-4.0.1/etc/tomcat-6-jira.xml /etc/tomcat6/Catalina/localhost/jira.xml
  • Restart tomcat and cross your fingers

Configure a file/email watcher

See: http://confluence.atlassian.com/display/JIRA/Creating+Issues+and+Comments+from+Email and http://confluence.atlassian.com/display/JIRA/Services#Services-BuiltinServices