Suresh Payankannur

Sunday, July 31, 2011

Confluence + Tomcat + Ubuntu + MySQL

To install the EAR/WAR version of Confluence follow these steps. This assumes basic knowledge on Ubuntu, MySQL, Tomcat etc.
  1. Download the latest EAR/WAR version
  2. Unpack the distribution
        % sudo tar xvf confluence-3.4.6.tar -C /opt
  3. Create symlink wiki for the confluence distribution
        % cd /opt
        % sudo ln -s confluence-3.4.6 wiki
        % sudo chown -R tomcat6:tomcat6 wiki
  4. Create the data directory
        % sudo mkdir /var/data/wiki
        % sudo chown -R tomcat6:tomcat6 /var/data/wiki
  5. Edit the /opt/wiki/confluence/WEB-INF/classes/ and set the value of variable confluence.home to /opt/wiki/confluence
  6. Edit /etc/default/tomcat6 and adjust the JVM settings
    JAVA_OPTS="-Djava.awt.headless=true -Xmx640m -XX:+UseConcMarkSweepGC -XX:MaxPermSize=256m"
  7. Modify /opt/wiki/confluence/WEB-INF/classes/ so that the log files will be produced under /var/log/tomcat6
    • Comment the line for ConfluenceHomeLogAppender
    • Uncomment the line for RollingFileAppender
    • Set the log location to /var/log/tomcat6/atlassian-confluence.log
    • Set the debug threshold to WARN
  8. Create a confluence database
        % mysqladmin -u root -p create wiki
        % mysql -u root -p
        % mysql> grant all privileges on wiki.* to 'wikiuser'@'localhost' identified by 'wikipass' with grant option;
        % mysql> commit;
        % mysql> flush all privileges;
  9. Setup the confluence context: In the /var/lib/tomcat6/conf/Catalina/localhost directory, create a file called confluence.xml with the following contents:
    <Context path="/wiki" docBase="/opt/wiki/confluence" debug="0" reloadable="0"/>
  10. Restart tomcat
        % sudo /etc/init.d/tomcat6 restart

  11. Point the browser to localhost:8080/wiki and follow the instructions


Post a Comment

Blog Archive

Scroll To Top