Versioner sammenlignet

Nøgle

  • Linjen blev tilføjet.
  • Denne linje blev fjernet.
  • Formatering blev ændret.

Indholdsfortegnelse

Requirements

Atlassian

See See https://confluence.atlassian.com/display/DOCJIRA/SystemJIRA+Requirements for newest requirements

OS and Hardware Settings

Virtual: Why not - the benefist are huge

Preferred OS: Linux  Ubuntu LTS 64 Bit -bit

Hardware: At least 2 CPU's and at lease least 3 GB Ram

File Limits Raise for "Open Files", this is for Ubuntu

...

...

* soft nofile 100000
* hard nofile 100000

root soft nofile 100000
root hard nofile 100000


 

Mysql Settings

Preferred Database: MySQL (or Postgres)

...

Kodeblok
titlemy.cnf
[mysqld]
transaction#transaction-isolation = READ-COMMITTED (Seems obsolete with binlog_format=row)
log-bin=mysql-bin
binlog_format=row
default-table-type=innodb
default-storage-engine=innodb
max_allowed_packet=32M64M

[mysql]
default-character-set=utf8

...

Kodeblok
titlemy.cnf
[mysqld]
innodb_lock_wait_timeout = 300

 


Mail

SMTP Access for sending mail

IMAP Access for picking up mail

 


Installation

Prepare database

Create the Database

Kodeblok
mysql> createCREATE databaseDATABASE confluencejira CHARACTER SET utf8 COLLATE utf8_bin;
mysql> grant all privilegesGRANT SELECT,INSERT,UPDATE,DELETE,CREATE,DROP,ALTER,INDEX on confluencejira.* to confluence@localhostjira@localhost identified by '*******';
Query OK, 0 rows affected (0.00 sec)

 


Install binaries

Download Confluence JIRA from http://www.atlassian.com/software/confluence/downloadjira/download

Download the MySQL JDBC from http://dev.mysql.com/downloads/connector/j/

For the binary installer, JAVA is integrated, for EAR or WAR files this must be downloaded and installed separately.

Kodeblok
sh ./atlassian-confluencejira-56.1.15-x64.bin

Follow the required steps (remember path to ConfluenceJIRA_HomeInstall and ConfluenceJIRA_DataHome) and connect to the tomcat instance started 

Advarsel

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


Postinstall

This is where the tweaking comes into place, to avoid common problems:

confluence.cfg.xml

This file is found in Confluence_Data

Change the number of Database connections to higher than standard

Kodeblok
<property name="hibernate.c3p0.max_size">50</property>

Make sure that the ?autoReconnect=true is on the jdbc connection

...

:

...


setenv.sh

This file is found in the ConfluenceJIRA_HomeInstall/bin

Add support for UTF-8 File system by adding -Dfile.encoding=UTF-8 to the JAVA_OPTS:

Kodeblok
JAVA_OPTS="-Xms1024m -Xmx1024m -XX:MaxPermSize=512m $JAVA_OPTS -Djava.awt.headless=true -XX:NewSize=512m -Dfile.encoding=UTF-8"
export JAVA_OPTS

Tweaking of memory and usage comes in play here, I prefer this for a 4 GB Server:

...


server

...

.

...

Kodeblok
JAVA_OPTS="-Xms2048m -Xmx2048m -XX:MaxPermSize=512m -Djava.awt.headless=true -verbose:gc -Xloggc:/pack/confluence/logs/gc.log -XX:+PrintGCTimeStamps -XX:+PrintGCDetails -XX:NewSize=700m -XX:+UseParallelGC -Dsun.rmi.dgc.client.gcInterval=900000 -Dsun.rmi.dgc.server.gcInterval=900000 -XX:+DisableExplicitGC -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/backup/hdump -Dfile.encoding=UTF-8"
export JAVA_OPTS

server.xml

This file is found in ConfluenceJIRA_HomeInstall/conf

Binding to a fixed IP Address, add the address= to the connector. Also the port= can be changed (Under Linux only root can bond bind to 0-1023):

Kodeblok
<Connector className="org.apache.coyote.tomcat4.CoyoteConnector" port="8080" address="10.0.0.10" minProcessors="5"
                   maxProcessors="75"
                   enableLookups="false" redirectPort="8443" acceptCount="10" debug="0" connectionTimeout="20000"
                   useURIValidationHack="false" />

...

If behind a traffic Manager or Apache Proxy, add scheme=, proxyName= and proxyPort to the context (See Apache2 Proxy Passing or Proxy Passing section belov):

Kodeblok
<Context path="" docBase="../confluence" debug="0" reloadable="false" useHttpOnly="true" scheme="https" proxyName="jira.example.com" proxyPort="443">

If the Tomcat needs to travel through symbolic links on the filesystem, add the allowLinking="true" to the contextJIRA instance need to run below root /, change the path= parameter:

Kodeblok
<Context path="/jira" docBase="../confluence" debug="0" reloadable="false" useHttpOnly="true" allowLinking="true">

If the Confluence instance need to run below root /, change the path= parameter:

Other

Proxy passing

There are good reasons for using an Apache or Traffic Manager in front of the Confluence Installation, some are:

  • No port changing (non-root users can assign to ports below 1024)
  • Use of URL Rewrite
  • Use of URL Blocking
  • Use of Allow/Denial 
  • SSL offloading/handling outside the Confluence

Se my example in Apache2 Proxy Passing

Time And Date Setup

Time and Date should be set up 2 places according to 

https://confluence.atlassian.com/display/JIRA/Customizing+the+Look+and+Feel

https://confluence.atlassian.com/display/JIRA/Advanced+JIRA+Configuration

My formats for danish is:

Kodeblok
Time Format                             HH:mm
Day Format                              dd-MM-yyyy
Complete Date/Time Format               dd-MM-yyyy HH:mm
Day/Month/Year Format                   dd-MM-yyyy
 
jira.date.picker.java.format            dd-MM-yyyy
jira.date.picker.javascript.format      %d-%m-%Y
jira.date.time.picker.java.format       dd-MM-yyyy HH:mm
jira.date.time.picker.javascript.format %d-%m-%Y %H:%M

Performace inprovement

For setenv.sh (Reference: https://answers.atlassian.com/questions/327828/tomcat-uses-100-cpu-after-jira-upgrade)

Kodeblok
-Dorg.apache.jasper.runtime.BodyContentImpl.LIMIT_BUFFER=true
-Dmail.mime.decodeparameters=true
Kodeblok
<Context path="/confluence" docBase="../confluence" debug="0" reloadable="false" useHttpOnly="true" allowLinking="true">


Logfiles

Logrotate

Set up logrotate to avoid ever growing catalina.out log file. Here ConfluenceJIRA_Home is /opt/confluencejira, logs are rotated daily and keept kept for 7 days:

Kodeblok
title/etc/logrotate.d/confluence
/opt/confluencejira/logs/catalina.out {
    daily
    rotate 7 
    compress
    copytruncate
    delaycompress
    missingok
    size 10M
    notifempty
}