Recently, I needed to install JIRA (5.2.2) and Confluence (4.3.5) on CentOS (6.3). Atlassian documentation is pretty straightforward but I was struggling for some time with my specific configuration that is not so common (I think). Im using Apache as a reverse proxy to JIRA / Confluence tomcats. Jira is running on :8080 and Confluence on :8090. Apache is using SSL and both Tomcats only http.
My goals were:
- run both applications on same machine behind Apache
- run both applications on same mysql instance (on same server)
- use Apache with SSL and use apaches reverse proxy module to access both application
- run JIRA on https://jira.example.com
- run Confluence on https://jira.example.com/confluence
So if you need to install JIRA & Confluence like me, you can use my guide. I hope it will help you and you won’t waste time like I did :).
- CentOS 6.3
- Apache >= 2.2 (with mod_ssl & mod_proxy installed)
- Mysql >= 5.1
- ssh root access to server
So lets begin:
Download jira standalone somewhere (eg. root home folder)
I’ve downloaded atlassian-jira-5.2.2.tar.gz and atlassian-confluence-4.3.5.tar.gz from Atlassian.
Create folder structure
Copy application to destination folder
Copy atlassian-jira-5.2.2.tar.gz content to /opt/atlasian/jira/5.2.2/ and
atlassian-confluence-4.3.5.tar.gz content to /opt/atlasian/confluence/4.3.5/.
Now set permissions one more time:
Configure JIRA & Cunfluence server.xml
What you need is to config JIRA and Confluence tomcat to work behind https proxy.
Also you need to change path for Confluence so that you can access confluence on https://jira.example.com/confluence.
JIRA is using JIRA_HOME env variable to find its home (data) folder but confluence needs to be configured manualy.
Setup apache ssl and reverse proxy
I have my certificate and key file in /etc/httpd/ssl/. So if you need just change SSLCertificateFile and SSLCertificateKeyFile path to your files.
Now you can check Apache configuration. If it says “Syntax OK” than everything should be ok. If no then check for any error in your configuration (typos, …).
Configure mysql users and databases
Dont forget to change passwords in the script.
Create starting scripts
Then add permisions to execute:
Start apache, mysql, jira and confluence
If there is some problem check Apache log for error and catalina logs for Tomcats.
I found out that I need to allow Apache to connect, so my proxy can work.
[Wed Dec 19 16:19:08 2012] [error] (13)Permission denied: proxy: HTTP: attempt to connect to 127.0.0.1:8080 (127.0.0.1) failed
If you find something like this, just run this command and restart Apache.
So I hope this “cookbook” will help someone. I wrote it down only do not forget how I did it and to save some time next time, when I do something like this.