Confluence 5.1.4 installation and configuration on Linux

Over the past 2 years or more I’ve become a bit of an expert and/or go to person for Confluence. Below is my notes on how I would do a Confluence 5.1.4 deployment, please note it will not be a detailed process. We will have some assumed knowledge.

Prerequisites:

  • Linux client/server installed
  • apache2 installed
  • mysql installed (I use mysql still)

Download the Confluence 5.1.4 bin file and copy it to your client/server. Since we will be using mysql, we should also download the mysql connector per the Confluence documentation. See step 6 on this page here.

1. Create the mysql database that you will use for your confluence;

mysql> create database confluence_wiki character set utf8 collate utf8_bin;

2. Create a mysql user with a password and provide it the privileges required to access the database above;

mysql> create user ‘conf’@’localhost’ identified by ‘password_string’;
mysql> grant all privileges on confluence_wiki.* to ‘conf’@’localhost’;
mysql> flush privileges;

3. You can check the account privileges via the command below;

mysql> show grants for ‘conf’@’localhost’;

4. Now chmod 755 the Confluence 5.1.4 bin file you got and execute it. Run through the installation and define your install path and confluence data path.

5. Extract the contents of the mysql connector archive and copy the jar file to the path below;

<Confluence installation>/confluence/WEB-INF/lib

6. Before you now point your browser at the Confluence to complete the setup, I would recommend you stop and start it. Below is the scripts you can use to perform this.

<Confluence installation>/confluence/bin/stop-confluence.sh
<Confluence installation>/confluence/bin/start-confluence.sh

7. Now you can point your browser at the URL stated back at the end of step 4. Complete the installation as needed, following the Confluence installation documentation.

If you’d like for your users to be able to access the Confluence via an apache2 vhost, without the need to remember the servers name/ip and port for the Confluence installation you can do the steps below.

Prerequisites

Ensure that you have the DNS setup for the vhost, so clients go sent to this webserver.

1. Setup the vhost configuration file in Linux distribution specific way. i.e. Debian is /etc/apache2/sites-available

Sample vhost configuration file;

<VirtualHost *:80>
ServerName wiki.domain.com
ServerAlias wiki
ServerAdmin webmaster@domain.com

ProxyPreserveHost On

<Proxy *>
Order deny,allow
Allow from all
</Proxy>

ProxyPass / http://localhost:8090/
ProxyPassReverse / http://localhost:8090/

ErrorLog ${APACHE_LOG_DIR}/error.log

# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn

CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>

If my vhost was called wiki.domain.com, it would send all client connections to wiki.domain.com to the localhost:8090. Thus serving out the default confluence installation just completed prior above. If you have multiple confluence installs on the client/server, you would just make as many vhosts as you need and modify the port on the end to point to each unique confluence install.

2. Ensure you have installed the proxy* modules for apache2 and have them enabled. i.e. Debian is the location below;

root@bravo:/etc/apache2/mods-available# ls -l proxy*
-rw-r–r– 1 root root 87 Mar 3 23:07 proxy_ajp.load
-rw-r–r– 1 root root 355 Mar 3 23:07 proxy_balancer.conf
-rw-r–r– 1 root root 97 Mar 3 23:07 proxy_balancer.load
-rw-r–r– 1 root root 803 Mar 3 23:07 proxy.conf
-rw-r–r– 1 root root 95 Mar 3 23:07 proxy_connect.load
-rw-r–r– 1 root root 141 Mar 3 23:07 proxy_ftp.conf
-rw-r–r– 1 root root 87 Mar 3 23:07 proxy_ftp.load
-rw-r–r– 1 root root 89 Mar 3 23:07 proxy_http.load
-rw-r–r– 1 root root 62 Mar 3 23:07 proxy.load
-rw-r–r– 1 root root 89 Mar 3 23:07 proxy_scgi.load
root@bravo:/etc/apache2/mods-available# pwd
/etc/apache2/mods-available

They can be enabled by running “a2enmod proxy_ajp” etc.

Be sure to restart apache2 when all done.

3. If you have everything configured correctly, you should be able to access http://wiki.domain.com and get set to the confluence install you completed previously. I would recommend updating the hostname in the confluence console to use the vhost if it all works, so any links that get generated now use the vhost.

— That concludes things.

 

One thought on “Confluence 5.1.4 installation and configuration on Linux”

Leave a Reply

Your email address will not be published. Required fields are marked *