Wiki source code of JIRA Install Cookbook
Version 3.1 by Normann P. Nielsen on 2026/11/15 15:44
Show last authors
| author | version | line-number | content |
|---|---|---|---|
| 1 | {{toc/}} | ||
| 2 | |||
| 3 | = Requirements = | ||
| 4 | |||
| 5 | === Atlassian === | ||
| 6 | See [[https://confluence.atlassian.com/display/JIRA/JIRA+Requirements]] for newest requirements | ||
| 7 | |||
| 8 | === OS and Hardware Settings === | ||
| 9 | **Virtual: **Why not - the benefist are huge | ||
| 10 | |||
| 11 | **Preferred OS:** Ubuntu LTS 64-bit | ||
| 12 | |||
| 13 | **Hardware:** At least 2 CPU's and at least 3 GB Ram | ||
| 14 | |||
| 15 | |||
| 16 | |||
| 17 | Mysql Settings | ||
| 18 | |||
| 19 | **Preferred Database:** MySQL (or Postgres) | ||
| 20 | |||
| 21 | Settings for MySQL (ref: [[MySQL>>http://confluence.atlassian.com/display/DOC/Database+Setup+For+MySQL]]) | ||
| 22 | |||
| 23 | |||
| 24 | {{code language="my.cnf"}} | ||
| 25 | [mysqld] | ||
| 26 | #transaction-isolation = READ-COMMITTED (Seems obsolete with binlog_format=row) | ||
| 27 | log-bin=mysql-bin | ||
| 28 | binlog_format=row | ||
| 29 | default-table-type=innodb | ||
| 30 | default-storage-engine=innodb | ||
| 31 | max_allowed_packet=64M | ||
| 32 | |||
| 33 | [mysql] | ||
| 34 | default-character-set=utf8 | ||
| 35 | |||
| 36 | {{/code}} | ||
| 37 | |||
| 38 | On large installations or where indexes are huge, changing ##innodb_lock_wait_timeout## can be an option (Ref: [[JIRAKB>>https://confluence.atlassian.com/display/JIRAKB/Reindexing+JIRA+Results+in+Communications+Link+Failure+During+Commit]]) | ||
| 39 | |||
| 40 | |||
| 41 | {{code language="my.cnf"}} | ||
| 42 | [mysqld] | ||
| 43 | innodb_lock_wait_timeout = 300 | ||
| 44 | {{/code}} | ||
| 45 | |||
| 46 | |||
| 47 | |||
| 48 | === Mail === | ||
| 49 | SMTP Access for sending mail | ||
| 50 | |||
| 51 | IMAP Access for picking up mail | ||
| 52 | |||
| 53 | |||
| 54 | |||
| 55 | = Installation = | ||
| 56 | |||
| 57 | === Prepare database === | ||
| 58 | Create the Database | ||
| 59 | |||
| 60 | |||
| 61 | {{code}} | ||
| 62 | mysql> CREATE DATABASE jira CHARACTER SET utf8 COLLATE utf8_bin; | ||
| 63 | mysql> GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,DROP,ALTER,INDEX on jira.* to jira@localhost identified by '*******'; | ||
| 64 | Query OK, 0 rows affected (0.00 sec) | ||
| 65 | {{/code}} | ||
| 66 | |||
| 67 | |||
| 68 | |||
| 69 | === Install binaries === | ||
| 70 | Download JIRA from [[http://www.atlassian.com/software/jira/download]] | ||
| 71 | |||
| 72 | Download the MySQL JDBC from [[http://dev.mysql.com/downloads/connector/j/]] | ||
| 73 | |||
| 74 | For the binary installer, JAVA is integrated, for EAR or WAR files this must be downloaded and installed separately. | ||
| 75 | |||
| 76 | |||
| 77 | {{code}} | ||
| 78 | sh ./atlassian-jira-6.1.5-x64.bin | ||
| 79 | {{/code}} | ||
| 80 | |||
| 81 | Follow the required steps (remember path to JIRA_Install and JIRA_Home) and connect to the tomcat instance started | ||
| 82 | |||
| 83 | {{error}}Configuration should (if possible) be done directly at the host:8080 - going through a proxy or trafficmanager add a risk that pages time out, leaving the JIRA server (and the client) in an unknown state{{/error}} | ||
| 84 | |||
| 85 | |||
| 86 | |||
| 87 | = Postinstall = | ||
| 88 | |||
| 89 | This is where the tweaking comes into place, to avoid common problems: | ||
| 90 | |||
| 91 | |||
| 92 | |||
| 93 | === setenv.sh === | ||
| 94 | This file is found in the JIRA_Install/bin | ||
| 95 | |||
| 96 | Add support for UTF-8 File system by adding //-Dfile.encoding=UTF-8// to the JAVA_OPTS: | ||
| 97 | |||
| 98 | |||
| 99 | {{code}} | ||
| 100 | JAVA_OPTS="-Xms1024m -Xmx1024m -XX:MaxPermSize=512m $JAVA_OPTS -Djava.awt.headless=true -XX:NewSize=512m -Dfile.encoding=UTF-8" | ||
| 101 | export JAVA_OPTS | ||
| 102 | {{/code}} | ||
| 103 | |||
| 104 | |||
| 105 | |||
| 106 | === server.xml === | ||
| 107 | This file is found in JIRA_Install/conf | ||
| 108 | |||
| 109 | Binding to a fixed IP Address, add the //address=// to the connector. Also the //port=// can be changed (Under Linux only root can bind to 0-1023): | ||
| 110 | |||
| 111 | |||
| 112 | {{code}} | ||
| 113 | <Connector className="org.apache.coyote.tomcat4.CoyoteConnector" port="8080" address="10.0.0.10" minProcessors="5" | ||
| 114 | maxProcessors="75" | ||
| 115 | enableLookups="false" redirectPort="8443" acceptCount="10" debug="0" connectionTimeout="20000" | ||
| 116 | useURIValidationHack="false" /> | ||
| 117 | {{/code}} | ||
| 118 | |||
| 119 | To secure correct UTF-8 Handling, add URIEncoding="UTF-8" to the connector: | ||
| 120 | |||
| 121 | |||
| 122 | {{code}} | ||
| 123 | <Connector className="org.apache.coyote.tomcat4.CoyoteConnector" port="8080" address="10.0.0.10" minProcessors="5" | ||
| 124 | maxProcessors="75" | ||
| 125 | enableLookups="false" redirectPort="8443" acceptCount="10" debug="0" connectionTimeout="20000" | ||
| 126 | useURIValidationHack="false" URIEncoding="UTF-8" /> | ||
| 127 | {{/code}} | ||
| 128 | |||
| 129 | If behind a traffic Manager or Apache Proxy, add //scheme=, proxyName= and proxyPort// to the context (See [[Apache2 Proxy Passing>>Main.information-technology.apache2-webserver.apache2-proxy-passing]] or Proxy Passing section belov): | ||
| 130 | |||
| 131 | |||
| 132 | {{code}} | ||
| 133 | <Context path="" docBase="../confluence" debug="0" reloadable="false" useHttpOnly="true" scheme="https" proxyName="jira.example.com" proxyPort="443"> | ||
| 134 | {{/code}} | ||
| 135 | |||
| 136 | If the JIRA instance need to run below root /, change the //path=// parameter: | ||
| 137 | |||
| 138 | |||
| 139 | {{code}} | ||
| 140 | <Context path="/jira" docBase="../confluence" debug="0" reloadable="false" useHttpOnly="true" allowLinking="true"> | ||
| 141 | {{/code}} | ||
| 142 | |||
| 143 | = Other = | ||
| 144 | |||
| 145 | === Proxy passing === | ||
| 146 | There are good reasons for using an Apache or Traffic Manager in front of the Confluence Installation, some are: | ||
| 147 | |||
| 148 | * No port changing (non-root users can assign to ports below 1024) | ||
| 149 | * Use of URL Rewrite | ||
| 150 | * Use of URL Blocking | ||
| 151 | * Use of Allow/Denial | ||
| 152 | * SSL offloading/handling outside the Confluence | ||
| 153 | Se my example in [[Apache2 Proxy Passing>>Main.information-technology.apache2-webserver.apache2-proxy-passing]] | ||
| 154 | |||
| 155 | === Time And Date Setup === | ||
| 156 | Time and Date should be set up 2 places according to | ||
| 157 | |||
| 158 | [[https://confluence.atlassian.com/display/JIRA/Customizing+the+Look+and+Feel]] | ||
| 159 | |||
| 160 | [[https://confluence.atlassian.com/display/JIRA/Advanced+JIRA+Configuration]] | ||
| 161 | |||
| 162 | My formats for danish is: | ||
| 163 | |||
| 164 | |||
| 165 | {{code}} | ||
| 166 | Time Format HH:mm | ||
| 167 | Day Format dd-MM-yyyy | ||
| 168 | Complete Date/Time Format dd-MM-yyyy HH:mm | ||
| 169 | Day/Month/Year Format dd-MM-yyyy | ||
| 170 | |||
| 171 | jira.date.picker.java.format dd-MM-yyyy | ||
| 172 | jira.date.picker.javascript.format %d-%m-%Y | ||
| 173 | jira.date.time.picker.java.format dd-MM-yyyy HH:mm | ||
| 174 | jira.date.time.picker.javascript.format %d-%m-%Y %H:%M | ||
| 175 | {{/code}} | ||
| 176 | |||
| 177 | === Performace inprovement === | ||
| 178 | For setenv.sh (Reference: [[https://answers.atlassian.com/questions/327828/tomcat-uses-100-cpu-after-jira-upgrade]]) | ||
| 179 | |||
| 180 | |||
| 181 | {{code}} | ||
| 182 | -Dorg.apache.jasper.runtime.BodyContentImpl.LIMIT_BUFFER=true | ||
| 183 | -Dmail.mime.decodeparameters=true | ||
| 184 | {{/code}} | ||
| 185 | |||
| 186 | |||
| 187 | |||
| 188 | = Logfiles = | ||
| 189 | |||
| 190 | === Logrotate === | ||
| 191 | Set up logrotate to avoid ever growing catalina.out log file. Here JIRA_Home is /opt/jira, logs are rotated daily and kept for 7 days: | ||
| 192 | |||
| 193 | |||
| 194 | {{code language="/etc/logrotate.d/confluence"}} | ||
| 195 | /opt/jira/logs/catalina.out { | ||
| 196 | daily | ||
| 197 | rotate 7 | ||
| 198 | compress | ||
| 199 | copytruncate | ||
| 200 | delaycompress | ||
| 201 | missingok | ||
| 202 | size 10M | ||
| 203 | notifempty | ||
| 204 | } | ||
| 205 | {{/code}} |