Ubuntu 12.04 /12.10 Ultimate Atlassian Production Server : Crowd + JIRA + Confluence + Stash + Fisheye | Single Sign On (SSO) | Fully Integrated | PostgreSQL ( pgSQL ) + Oracle Java 1.7( JDK 7 ) + Apache2 + SSL ( https ) + SNI (Shared SSL) + PROXY_AJP ( ajp ) + Optimised

Ubuntu 12.04 /12.10 Ultimate Atlassian Production Server : Crowd + JIRA + Confluence + Stash + Fisheye | Single Sign On (SSO) | Fully Integrated | PostgreSQL ( pgSQL ) + Oracle Java 1.7( JDK 7 ) + Apache2 + SSL ( https ) + SNI (Shared SSL) + PROXY_AJP ( ajp ) + Optimised

Updated: 16-Jan-2014: fix for git certificate errors, caused by merged crt+ca certificate, fix for minor bugs, thanks THEMO

Assumptions:

Completed Server Preparation: KVM / VMware / Standalone Ubuntu 12.04 / 12.10 Server Preparation or Proxmox / OpenVZ Container / Ubuntu 12.04 /12.10 Server Preparation

Stages: Server Preparation (Java, SSL, Apache)
Install Jira, Confluence, Crowd, Stash
Jira, Confluence, Stash, Fisheye Crowd User Integration (Syncronised user accounts)
Jira, Confluence, Fisheye Single Sign On (SSO)
Jira Stash Integration
Jira Fisheye Integration
Jira Confluence Integration
Stash Fisheye Integration
Stash Confluence Integration
Confluence Fisheye Integration

Notes:

You will require a wildcard SSL *.domain.com to enable ssl, you can purchase one directly from us.
I will be using Server Name Indication (SNI), to allow for multiple SSL sites on single IP address.
Server is firewalled and only ports 80 (http), 443 (https), 465 (secure smtp) and 7999 (Stash SSH) are open.

— Apache —
HTTP Port: 80
HTTPS Port: 443

— Jira —
AJP Port: 8009
HTTP Port: 8080
Control Port: 8005
Domain: jira.yourdomain.com
Installation: /opt/atlassian/jira
Data: /var/atlassian/application-data/jira

— Confluence —
AJP Port: 8007
HTTP Port: 8090
Control Port: 8000
Domain: confluence.yourdomain.com
Installation: /opt/atlassian/confluence
Data: /var/atlassian/application-data/confluence

— Crowd —
AJP Port: 8011
HTTP Port: 8095
Domain: crowd.yourdomain.com
Installation: /opt/atlassian/crowd
Data: /var/atlassian/application-data/crowd

— Stash —
AJP Port: 8013
HTTP Port: 7990
SSH Port: 7999
Domain: stash.yourdomain.com
Installation: /opt/atlassian/stash
Data: /var/atlassian/application-data/stash

— FishEye —
AJP Port: 8015
HTTP Port: 8060
Domain: fisheye.yourdomain.com
Installation: /opt/atlassian/fisheye
Data: /var/atlassian/application-data/fisheye

Server Preparation

Install the latest Oracle Java 1.7 / JDK7

add the repository

Install Java

Do you accept the Oracle Binary Code license terms? Yes

Set Oracle Java 1.7 as the default

Add the JAVA_HOME to the enviroment path

Verify

java version “1.7.0_11”
Java(TM) SE Runtime Environment (build 1.7.0_11-b21)
Java HotSpot(TM) 64-Bit Server VM (build 23.6-b04, mixed mode)

/usr/lib/jvm/java-7-oracle

Prepare your ssl certificate

Create a working directory

Create the domain.crt
copy the ssl certificate into the file /etc/ssl/secure/domain.crt

Create the domain.ca-bundle
copy the ca bundle into the file /etc/ssl/secure/domain.ca-bundle

Create the domain.key
copy the private key into the file /etc/ssl/secure/domain.key

Remove the password from the domain.key

Create a bundled crt and ca

Convert the domain.pem – (X.509 Privacy Enhanced Mail)

NOTE: if you get the following error, it means your crt is already in pem format

unable to load certificate
139879794992968:error:0D0680A8:asn1 encoding routines:ASN1_CHECK_TLEN:wrong tag:tasn_dec.c:1320:
139879794992968:error:0D07803A:asn1 encoding routines:ASN1_ITEM_EX_D2I:nested asn1 error:tasn_dec.c:382:Type=X509/blockquote>
If you received the above error run the following command

Install the SSL to the Java Keystore

Will fix the following error: SSL handshake failed. Please make sure you have installed the SSL certificate into the JVMs keystore.
Convert the key and crt to DER format

Import the key

Keystore password: changeit
Trust this certificate? yes

Install Apache2 as reverse proxy aith AJP connector

AJP is a