Dashboard > Knowledge Base > ... > Confluence > Step by Step Setup Confluence on eApps Baby Growth Chart | Bing's Space | Bing's Blog | Photo Album
  Knowledge Base Log In   View a printable version of the current page.  
  Step by Step Setup Confluence on eApps

This is the home page for the Knowledge Base space.

Added by Bing Zou, last edited by Bing Zou on Sep 17, 2007  (view change)
Labels: 

Article Rating?

I will use an example of 280MB VPS and show you how easy you can setup Confluence. The whole process should
take less than 5 minutes excluding the time spent in downloading confluence and mysqlj connector. At the end, you should have Confluence available through port 80 and using Mysql as the backend database with UTF8 support.

Step 1 - Install MySQL 5, Tomcat 5.5, mod_jk on your VPS

eApps has a very easy way to select applications to be installed on your VPS. Since the resources are very limited on your VPS, it is recommended to select only the applications you needed and nothing else. I also suggest not to install the FTP server, sftp via ssh is highly recommended. Core FTP Lite is a very good and free sftp client.

Step 2 - Download and Extract Confluence

cd /tmp
wget http://www.atlassian.com/software/confluence/downloads/binary/confluence-2.5.6.tar.gz
tar zxvf confluence-2.5.6.tar.gz
sudo mv confluence-2.5.6 /usr/share/

Step 3 - Add Confluence to Tomcat

cd /opt/tomcat5/conf
vi server.xml
jump to the end of the file and add the following right above the last </Host>
        <Context path="/confluence" docBase="/usr/share/confluence-2.5.6/confluence" debug="0" reloadable="false">
          <Manager pathname="" />
        </Context>

Step 4 - Configure Confluence

  1. create directory for storing confluence data, backup, attachments, etc..
    cd /srv
    sudo mkdir confluence
    cd confluence
    sudo mkdir data
    cd ..
    sudo chown -hR tomcat5 confluence
  2. configure confluence to use the directory created above cd
    /usr/share/confluence-2.5.6/confluence/WEB-INF/classes/
    sudo vi confluence-init.properties
    uncomment the last line and change to 
    confluence.home=/srv/confluence/data

Step 5 - Create a database in MySQL for Confluence

  1. Download MySQL JDBC Driver
    wget http://dev.mysql.com/get/Downloads/Connector-J/mysql-connector-java-5.0.7.tar.gz/from/http://mirror.x10.com/mirror/mysql/
    tar zxvf mysql-connector-java-5.0.7.tar.gz
    cd mysql-connector-java-5.0.7
    sudo cp mysql-connector-java-5.0.7-bin.jar /usr/share/confluence-2.5.6/confluence/WEB-INF/lib/
  2. Create database with UTF8 support for Confluence
    mysql -u root 
    CREATE DATABASE confluence CHARACTER SET utf8 COLLATE utf8_general_ci;
    grant all on confluence.* to 'atlassian'@'localhost' identified by 'confluence';
    flush privileges;

If you use the mysql admin tool in the eApps control panel to create this database, keep in mind that the database created doesn't support UTF8. If you want UTF8 support, you need to drop that database and create one with the command line. Also do remember to change the mysql root password.

Step 6 - Start and Configure Confluence to use the database just created

Use the Tomcats admin tool in eApps Control Panel to restart tomcat. Then

  1. open a broswer and hit http://ip:8080/ you should see the Confluence installation guide
  2. go to this link and request a personal license
  3. add license key then choose "Custom Installation"
  4. on "External Database", select "Mysql" from drop down menu then click on "External Databases" button
  5. click "Direct JDBC" button and use the following info
    jdbc:mysql://localhost/confluence?autoReconnect=true&useUnicode=true&characterEncoding=utf8 
    username: atlassian 
    password: confluence
  6. click "Next", wait a while for the database tables to be created and data initialized.
  7. Then you should see the "Load Content" page, you can choose "Empty Site", then create an admin account or choose the other paths
  8. Now you can start enjoying your personal wiki with a stable Mysql database. (++)

Step 7 - Configure mod_jk to move Confluence to port 80

  1. Go to eApps Control Panel, click on "Website Settings"
  2. Click on "Custom Settings" and add the following
    JkMount /confluence/* ajp13

(Optional) Step 8 - redirect your site homepage to Confluence

  1. ssh to your server
  2. go to directory "/home/webadmin/sitename/html"
  3. edit index.shtml and add a redirect command to the header area of the file, an example as follows:
    <head>
    <meta HTTP-EQUIV="REFRESH" content="0; url=http://www.xiguaforever.net/confluence/">
    <title>Redirecting to Confluence</title>
    </head>

Good document. I will use this on my site. -Mike L.

Posted by Anonymous at Sep 28, 2008 20:09 | Reply To This

Very nice BZ!

I'm currently trying to update to Confluence 3.0.1 using the eApps server. So for the steps involved which worked for 2.5.4 are not quite doing it for me. Tomcat starts up but I'm unable to access the Confluence install page. Still trying to trace down this problem.

Posted by Anonymous at Aug 26, 2009 14:45 | Reply To This

I should add my email: katzunit@yahoo.com ...

In case BZ or anyone else is moving to 3.0.1, I'd be happy to write up the steps involved once I figure them out!

  • todd
Posted by Anonymous at Aug 26, 2009 14:47 | Reply To This

Tried to upgrade to 3.0.1 using the virtual machine over the weekend and was partially successful. Basically I was able to upgrade to 3.0.1 but the login link and admin links are missing from the main page. I could still find the links to login screen and admin page by viewing the source file and paste the link directly to the browser, but I guess it would take me quite some time to figure out the issues since there are so many things changed from 2.5.4. to 3.0.1.

Since there is no compelling reason at this time for me to upgrade to 3.0.1 which will cause a lot more time to resolve the conflicts of the plugins, layouts, etc.. I am listing below the things to look out for during upgrade.

Main upgrade doc to follow: http://confluence.atlassian.com/display/DOC/Upgrading+Confluence+EAR-WAR+Distribution

  1. Download confluence 3.0.1
    wget http://www.atlassian.com/software/confluence/downloads/binary/confluence-3.0.1.tar.gz
    tar zxvf confluence-3.0.1.tar.gz
    sudo mv confluence-3.0.1 /usr/share/
  2. Preparation
    Make sure existing confluence license is not expired.
    http://confluence.atlassian.com/display/DOC/Viewing+and+Editing+License+Details
  3. Do the Backups
  4. Perform the Upgrade
    1. Copy mysql library jars to 3.0.1
      cp /usr/share/confluence-2.5.6/confluence/WEB-INF/lib/mysql-connector-java-5.0.7-bin.jar /usr/share/confluence-3.0.1/confluence/WEB-INF/lib
    2. Modify tomcat server.xml to point to confluence 3.0.1 directory
      vi /opt/tomcat5/conf/server.xml
  5. Restart tomcat

Issues that I found during upgrade (You might not see it on eApps):

  1. certain file got permission denied, I had to do "chmod -R 777 /srv/confluence/data" to ease the problem
  2. Getting Error during upgrade Specified key was too long; max key length is 1000 bytes. I found the issue logged at http://confluence.atlassian.com/pages/viewpage.action?pageId=192872609
    You can use the following scripts to update all the confluence tables to INNODB.
    ALTER TABLE ATTACHMENTDATA ENGINE=INNODB;
    ALTER TABLE ATTACHMENTS ENGINE=INNODB;
    ALTER TABLE BANDANA ENGINE=INNODB;
    ALTER TABLE BODYCONTENT ENGINE=INNODB;
    ALTER TABLE CLUSTERSAFETY ENGINE=INNODB;
    ALTER TABLE CONFANCESTORS ENGINE=INNODB;
    ALTER TABLE CONFVERSION ENGINE=INNODB;
    ALTER TABLE CONTENT ENGINE=INNODB;
    ALTER TABLE CONTENTLOCK ENGINE=INNODB;
    ALTER TABLE CONTENT_LABEL ENGINE=INNODB;
    ALTER TABLE CONTENT_PERM ENGINE=INNODB;
    ALTER TABLE CONTENT_PERM_SET ENGINE=INNODB;
    ALTER TABLE DECORATOR ENGINE=INNODB;
    ALTER TABLE DRAFT ENGINE=INNODB;
    ALTER TABLE EXTRNLNKS ENGINE=INNODB;
    ALTER TABLE FOLLOW_CONNECTIONS ENGINE=INNODB;
    ALTER TABLE INDEXQUEUEENTRIES ENGINE=INNODB;
    ALTER TABLE KEYSTORE ENGINE=INNODB;
    ALTER TABLE LABEL ENGINE=INNODB;
    ALTER TABLE LINKS ENGINE=INNODB;
    ALTER TABLE NOTIFICATIONS ENGINE=INNODB;
    ALTER TABLE OS_PROPERTYENTRY ENGINE=INNODB;
    ALTER TABLE PAGETEMPLATES ENGINE=INNODB;
    ALTER TABLE PLUGINDATA ENGINE=INNODB;
    ALTER TABLE SPACEGROUPPERMISSIONS ENGINE=INNODB;
    ALTER TABLE SPACEGROUPS ENGINE=INNODB;
    ALTER TABLE SPACEPERMISSIONS ENGINE=INNODB;
    ALTER TABLE SPACES ENGINE=INNODB;
    ALTER TABLE TRACKBACKLINKS ENGINE=INNODB;
    ALTER TABLE TRUSTEDAPP ENGINE=INNODB;
    ALTER TABLE TRUSTEDAPPRESTRICTION ENGINE=INNODB;
    ALTER TABLE external_entities ENGINE=INNODB;
    ALTER TABLE external_members ENGINE=INNODB;
    ALTER TABLE groups ENGINE=INNODB;
    ALTER TABLE hibernate_unique_key ENGINE=INNODB;
    ALTER TABLE local_members ENGINE=INNODB;
    ALTER TABLE os_group ENGINE=INNODB;
    ALTER TABLE os_user ENGINE=INNODB;
    ALTER TABLE os_user_group ENGINE=INNODB;
    ALTER TABLE users ENGINE=INNODB;

Last thing, the log file is very useful to find out what the problem could be.
Good Luck!

I followed you very useful guide with a 288MB eapps vps, but the performance was terribly slow even after adjusting the perm memory. I upgraded for the higher plan, but still lot of errorr due to memory...
Running confluence 3.1.2, any suggestion on any fine tuning ?
Thanks a lot !

Posted by Anonymous at Mar 18, 2010 15:30 | Reply To This

I am afraid it's because confluence 3.1.2 requires more memory. 288MB eapps vps works well with confluence 2.5.6. A few suggestions:

  1. Check http://confluence.atlassian.com/display/DOC/Memory+usage+and+requirements for fine tuned tips
  2. Login as admin and check JVM heap statistics
This site is powered by a free Atlassian Confluence Personal Server License. Evaluate Confluence for your organisation or read more about Confluence licensing here.
Powered by Atlassian Confluence, the Enterprise Wiki. (Version: 2.5.6 Build:#812 Aug 06, 2007) - Bug/feature request - Contact Administrators
Wanna try out Confluence? Follow the step by step tutorial or Download the Confluence Virtual Machine with 2-minute setup