December 12, 2018

How to Install Confluence on CentOS

Confluence Logo

We think Confluence (developed and marketed by Atlassian) is the best enterprise wiki out there. It has a plugin system and is very easy to configure. Confluence is written in Java and is mainly used in corporate environments. This instruction is to install Confluence on CentOS. We are using Confluence on CentOS 6 with 64 bit. Please change the paths when it is required.

Root access is required to edit the following files and to execute commands. Log in as root (su) or simply prepend sudo to all commands that require root privileges.

Install Java JDK and needed libraries

Confluence needs the Java JDK package and some libraries.

yum update
cd /tmp/
mv jdk* jdk-6.bin
chmod +x jdk-6.bin
mkdir /usr/lib/java
mv jdk1.6*/ /usr/lib/java/
yum install libICE-devel libSM-devel libX11-devel libXp-devel libXt-devel libXtst-devel libXext-devel

Install Confluence

Download the latest Confluence release.

cd /tmp

Add the confluence user.

useradd --create-home -c "Confluence role account" confluence

Create and move into the confluence directory.

mkdir -p /opt/confluence
cd /opt/confluence/

Decompress Confluence, link to current and set the ownership.

tar xvzf /tmp/atlassian-confluence-4.1.7.tar.gz
ln -s atlassian-confluence-4.1.7/ current
chown -R confluence: /opt/confluence

Add the Confluence home directory.

vi /opt/confluence/current/confluence/WEB-INF/classes/

Create the Confluence start script.

vi /etc/init.d/confluence

Add the following lines to the Confluence start script file.

# Confluence start/stop script.
# chkconfig: - 85 15
# description: Confluence is a wiki system.

# Source function library.
. /etc/rc.d/init.d/functions

case "$1" in
        su - confluence -c /opt/confluence/atlassian-confluence-4.1.7/bin/

        su - confluence -c /opt/confluence/atlassian-confluence-4.1.7/bin/

        su - confluence -c /opt/confluence/atlassian-confluence-4.1.7/bin/
        su - confluence -c /opt/confluence/atlassian-confluence-4.1.7/bin/

exit $retval

Set the ownership and add the start script to your chkconfig.

chmod +x /etc/init.d/confluence
chkconfig --add confluence
chkconfig confluence on

Feel free to change the Server and Connector port. The default port is 8090

vi /opt/confluence/current/conf/server.xml

Let Confluence know the Java JDK path.

vi /opt/confluence/atlassian-confluence-4.1.7/bin/

Add the path on the top of this file.

export JAVA_HOME

Now, we can start Confluence.

/etc/init.d/confluence start

The log file is located here:

less /opt/confluence/current/logs/catalina.out

Create the Confluence database

Log into MySQL as root and create the Confluence database. Replace PASSWORD with the password you want to use for the confluence database user.

mysql -u root -p
create database confluence character set utf8;
grant all privileges on confluence.* to confluence@localhost identified by 'PASSWORD' with grant option;
flush privileges;

Type in your server IP followed by the port number to see the Confluence setup.

Enter your licence key, choose Custom Installation, select MySQL, click on External Database and then click on Direct JDBC. Add the following JDBC path and enter your Confluence database user and password.

User: confluence
Password: PASSWORD

Restart Confluence for the changes to take effect.

/etc/init.d/confluence restart

Now. you can continue with the Confluence setup.


  1. Great post, really enjoyed it!
    — Eda

  2. vikramgorla says:

    Due to change in Oracle website adding cookie policy, wget in step 1 should have additional parameters as below:

    wget –no-check-certificate –no-cookies –header “Cookie: oraclelicense=accept-securebackup-cookie”

Speak Your Mind