We’ll explain, How to install Confluence on CentOS 7. Confluence is a wiki team collaboration software which is written in Java. It is a centralized place where you and your team members can work together on projects. With Confluence you can add custom features via plugins, integrate Microsoft Office and SharePoint, easily edit and publish project related tasks and more. Installing Confluence on CentOS 7, is an easy task and should take less than 15 minutes.
REQUIREMENTS
We will be using our CentOS 7 Linux VPS template for this tutorial. Before proceeding you should check the system requirements for Confluence.
The server on which you will install Confluence will need a working LAMP (Linux, Apache, MySQL & PHP) stack installed. So if you need to install LAMP you can do that by following our excellent tutorials. However, do not install MariaDB as shown in the tutorial since Confluence supports MySQL instead of MariaDB . We will cover the MySQL installation later in this article.
Table of Contents
1. Update the system
As always, make sure your server is fully up-to-date with the command below:
Also, install a text editor of your choice. We will use nano as our text editor:
2. Install and configure Java
Confluence requires JAVA in order to run. We are going to install Oracle’s JAVA JDK 8. Use the command below to download JDK 8:
Install JAVA:
Configure the JAVA package using the alternatives command:
You can check if JAVA has been properly setup on your server using:
3. Install MySQL server
You need to install MySQL from the community repository.
Download and install the repo:
Update the package index:
Now install and start MySQL:
Enable MySQL to start on boot:
With the MySQL installation out of our way, we can now create a database for the Confluence installation. But first, run the mysql_secure_installation script to harden your MySQL server:
Configure it like this:
Now, log into MySQL as root and create the database:
4. Install Confluence on CentOS 7
You need to download the appropriate Confluence ‘Linux 64-bit/ 32-bit installer’ from their download page.
We are using a 64-bit CentOS 7 VPS, so we will use the 64-bit installer.
You can use the arch command to check whether you are running a 64 or 32 bit OS on your server. For example our CentOS 7 OS is 64-bit:
Ok, now let’s get down to business. We are downloading the 64-bit installer:
Make the bin file executable:
Run the installer with ‘root‘ user privileges and the installation will create a dedicated Linux user account named ‘confluence‘ which will be used to run Confluence:
You will get the following output:
Press enter.
You can proceed with a custom install if you want, but we will enter 1 in our CLI for an Express install with the default settings:
Press Enter again to start the Confluence installation which will give you the below output:
5. Configure Confluence
As you can see, Confluence is listening on port 8090. You can change this and the URI path in the server.xml file. And indeed, we need to change the URL from which we will access Confluence. Therefore, enter the conf directory:
However, you need to shutdown Confluence first and then edit the server.xml file.
Now, find the ‘localhost’ value and replace it with your server IP address.
Save and exit the file. Next step is to configure a MySQL datasource connection for Confluence. In order to do that, you need to install the MySQL JDBC driver. Below is the procedure to do that. Execute the below commands:
With these commands you are downloading the JDBC driver in the /opt directory, extracting it and then move the unpacked jar file in the appropriate Confluence directory (/opt/atlassian/confluence/confluence/WEB-INF/lib/).
Next, edit the server.xml file again:
Find the following lines:
Insert the underneath lines within the Context element (between the ‘<Context path=”” docBase=”” ‘ and ‘<!– Logger is deprecated in Tomcat 5.5.” ‘ line):
Of course replace your_password with the password you configured during the creation of the confluence database. Save and close the file. Now edit the web.xml file located in the WEB-INF directory:
Insert the following components just before </web-app> near the end of the file:
Save and close the web.xml file.
6. Start Confluence
After all these changes you’ve made to the configuration files, you can now start Confluence. Issue this command:
For troubleshooting use the Confluence log file (/opt/atlassian/confluence/logs/catalina.out).
7. Finish the installation in web browser
You can now finish the Confluence installation at: http://your_server_IP:8090 . You will be welcomed by the installation page as shown in the picture below:
Click on Production Installation (you can choose a Trial Installation of course, since the Product install requires you to have an active Confluence license), choose if you want to have an addon and enter your license key in the following screen.
Then, set up the database. Choose MySQL and Direct JDBC Connection. Enter the corresponding settings:
Then click on Next and finish the Confluence configuration.
Congratulations, if you followed our steps carefully you now have a fully working Confluence installation on your CentOS 7 VPS. For more information about Confluence, visit their official documentation.
Of course you don’t have to install Confluence on CentOS 7, if you use one of our hosting services in which case you can simply ask our expert Linux admins to install Confluence on CentOS 7, for you. They are available 24×7 and will take care of your request immediately.
PS. If you liked this post, on how to install Confluence on CentOS 7, please share it with your friends on the social networks using the buttons on the left or simply leave a reply below. Thanks.
As a person who writes many of these guides for various subjects, just wanted to say thanks for this
to the point – short & well work for me in RHEL 6.8 ( version diff) Thanks you.
Thank you for the guide! It’s a really good one!
I have question:
Can you update this guide? Until the step “finishing installation of confluence” with a acutal confluence version it runs well over . Only the MySQL Connection does not work. If I will further configure confluence for the mysql database connection, after the configuration in centos (installed the old mysql connector 5.1.35 from this article), confluence crashed on (Website not available). I’m not sure if I configured at some points wrong, or the versions are crashing :-/
Greetz from germany
The guide has been updated. It now includes the latest Java and Confluence version, it has been tested and if you follow the instructions carefully it works without any issues.
I am unable to upgrade confluence 6.0.6 to latest can somebody help me