How to install Confluence on CentOS 7

In this tutorial I will show you how to install Confluence on CentOS 7.

Confluence is a team collaboration software. Written in Java and mainly used in corporate environments, it is developed and marketed by Atlassian. Confluence is sold as either on-premises software or as software as a service.


  • CentOS 7 must be installed
  • Java 8 must be installed

Install MariaDB

First of all we need MariaDB.

Use the following link to install MariaDB.

How to install MariaDB 10 on CentOS 7

Read Also: How to install PostgreSQL 10 on Ubuntu

Create Database

After installing Mariadb we will create a user and password for confluence.


Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 10
Server version: 5.5.56-MariaDB MariaDB Server

Copyright (c) 2000, 2017, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB [(none)]> CREATE DATABASE confluence CHARACTER SET utf8 COLLATE utf8_bin;
Query OK, 1 row affected (0.01 sec)

MariaDB [(none)]> GRANT ALL PRIVILEGES ON confluence.* TO 'confluence'@'localhost' 
IDENTIFIED BY 'password';
Query OK, 0 rows affected (0.01 sec)

Query OK, 0 rows affected (0.00 sec)

MariaDB [(none)]> exit

Download the Confluence

For downloading latest confluence we need to go to the Atlasssian Official website or use wget to download the


Make file executable

chmod +x atlassian-confluence-6.5.1-x64.bin

Install Confluence

[root@installvirtual ~]# ./atlassian-confluence-6.5.1-x64.bin
Unpacking JRE ...
Starting Installer ...
Nov 20, 2017 3:58:23 PM java.util.prefs.FileSystemPreferences$1 run
INFO: Created user preferences directory.
Nov 20, 2017 3:58:23 PM java.util.prefs.FileSystemPreferences$2 run
INFO: Created system preferences directory in java.home.

This will install Confluence 6.5.1 on your computer.
OK [o, Enter], Cancel [c]
Choose the appropriate installation or upgrade option.
Please choose one of the following:
Express Install (uses default settings) [1],
Custom Install (recommended for advanced users) [2, Enter],
Upgrade an existing Confluence installation [3]
See where Confluence will be installed and the settings that will be used.
Installation Directory: /opt/atlassian/confluence
Home Directory: /var/atlassian/application-data/confluence
HTTP Port: 8090
RMI Port: 8000
Install as service: Yes
Install [i, Enter], Exit [e]

Extracting files ...


Please wait a few moments while we configure Confluence.
Installation of Confluence 6.5.1 is complete
Start Confluence now?
Yes [y, Enter], No [n]
Installation of Confluence 6.5.1 is complete
Finishing installation ...

Download MySQL JDBC Driver

We also need MySQL JDBC driver for confluence so execute the following commands to download, extract and mv the driver to the required directory

tar -xvf mysql-connector-java-5.1.44.tar.gz
cd mysql-connector-java-5.1.44
mv mysql-connector-java-5.1.44-bin.jar /opt/atlassian/confluence/confluence/WEB-INF/lib/

Configure the datasource in Tomcat

Next, add the datasource configuration to Tomcat.

Edit /opt/atlassian/confluence/conf/server.xml and find the following lines.

<Context path="" docBase="../confluence" debug="0" reloadable="true">
<!-- Logger is deprecated in Tomcat 5.5. Logging configuration for Confluence is
specified in confluence/WEB-INF/classes/ -->

Insert the following DataSource  Resource  element for your specific database directly before  <!-- Logger is deprecated in Tomcat 5.5.

<Resource name="jdbc/confluence" auth="Container" type="javax.sql.DataSource"
validationQuery="Select 1"/>

Replace user and password with yours.

Configure the Confluence web application

Configure Confluence to use this datasource. Edit  /opt/atlassian/confluence/confluence/WEB-INF/web.xml and add the following in the second last line just before  </web-app>

<description>Connection Pool</description>

Start Confluence

Now after adding all the configuration now we will start confluence.

sh /opt/atlassian/confluence/bin/

Leave a Reply

Your email address will not be published.


The reCAPTCHA verification period has expired. Please reload the page.

48-Hour Flash Sale! Courses from just $10.99