Installing Confluence on CentOS 6


I am currently trying out different WIKI web based software packages for documentation for my company. This tutorial was extremely helpful and walked me through the entire process. I would recommend against using their one step installer because you do not really know where everything ends up being put. Here are the steps I took and got it up and running within a few hours.

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; quit

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.

jdbc:mysql://localhost:3306/confluence?autoReconnect=true 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.



Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s