Thursday 5 January 2012

Drupa Playing Nicely with Tomcat

Drupal is an open source content management platform powering millions of websites and applications. It’s built, used, and supported by an active and diverse community of people around the world.
Apache Tomcat is an open source software implementation of the Java Servlet and JavaServer Pages technologies. The Java Servlet and JavaServer Pages specifications are developed under the Java Community Process.  Apache Tomcat powers numerous large-scale, mission-critical web applications across a diverse range of industries and organizations.

HOWEVER they don't usually go together which is a shame.
I will be attempting to do just this based on the very good post by Chris Pliakas.

The article is very good but it assumes you have PHP installed already.
If you don't then you will get the following error in your Tomcat container:

SEVERE: Servlet /drupal threw load() exception
java.io.IOException: PHP not found. Please install php-cgi.


Therefore the steps are:


  • Move the "JavaBridge.war" file to the Tomcat webapps directory. Wait a few seconds for Tomcat to create a "JavaBridge" directory.
    sudo cp JavaBridge.war /var/lib/tomcat6/webapps/
    sleep 10

  • Copy the directory created by Tomcat and name it "drupal".
    sudo cp -rp /var/lib/tomcat6/webapps/JavaBridge /var/lib/tomcat6/webapps/drupal
  • Remove the index.php and test.php files from the "drupal" directory.
    sudo rm /var/lib/tomcat6/webapps/drupal/index.php /var/lib/tomcat6/webapps/drupal/test.php
     
  • Copy the Drupal files to the "drupal" directory, create the "settings.php" file.
    sudo rsync -aq drupal-7.0-rc4/ /var/lib/tomcat6/webapps/drupal
    sudo cp -p /var/lib/tomcat6/webapps/drupal/sites/default/default.settings.php /var/lib/tomcat6/webapps/drupal/sites/default/settings.php

No comments:

Post a Comment