Install notes for installing a Confluence instance on Amazon EC2
Steps adapted from this excellent guide at wiki2.easycloudsolutions.com.
Setup LAMP on server
We first need to setup a LAMP (Linux-Apache-MySQL-PHP) server. For Amazon Linux we can follow this tutorial on AWS.
Initialise and Run MySQL
Do an update on your Amazon Linux AMI
sudo yum update
Start MySQL:
sudo service mysqld start
Secure MySQL (enter root password for MySQL instance when prompted)
sudo mysql_secure_installation
Make sure to do (see below) to ensure service starts on reboot
sudo chkconfig mysqld on
Configure MySQL for confluence
Login to MySQL using terminal and your admin details
mysql -u root -p
Create the Confluence DB
CREATE DATABASE confluence CHARACTER SET utf8 COLLATE utf8_bin;
Create a user for Confluence, and give them full access
GRANT ALL PRIVILEGES ON confluence.* TO 'confluenceuser'@'localhost' IDENTIFIED BY '<PASSWORD>';
NOTE: replace '<PASSWORD>' with a secure password.
Refresh MySQL privileges:
FLUSH PRIVILEGES;
Set remaining settings according to here.
Install Confluence
See wiki entry for help.
- Download confluence install .bin file directly from Atlassian.
- Make it executable.
- Install by running bin (e.g. sudo ./xxx.bin).
- If using MySQL will need to install plaftform independent connector/J to
cp <connectorJ.jar> /opt/atlassian/confluence/lib
- restart confluence
- Access confluence on http://<domain>:8090
Confluence and related services
sudo service mysqld status sudo service mysqld start sudo service mysqld stop sudo service confluence start sudo service confluence stop sudo service confluence restart
The below directions for redirecting ports and setting up SSL on confluence are deprecated. Please see Apache reverse-proxy SSL to multiple server applications for a better solution to both port redirection and SSL.
Redirecting port 443 to 8443
We can iptables to route from https (443) to the confluence secured port as outlined here.
HTTPS (SSL) on Confluence
Confluence uses tomcat so we can use the Java .keystore method as outlined here.
Once installed, you need to modify the `server.xml` file located at <CONFLUENCE_INSTALL>/conf/server.xml.
Here is an example of enabling https on port 8443:
Where <PASSWORD> is the secure password you used when creating the .keystore file (see here for details).
Related articles