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:
- Install the required software packages, accept all dependencies.
php5-cgi
(http://php.net/manual/en/install.windows.manual.php)
(http://windows.php.net/download/)
The installer will ask which http server to set up, select "Other CGI" or you will be missing php-cgi.exe.
php5-gd
(http://php.net/manual/en/install.windows.extensions.php)
php5-mysql
(Included in setup)
tomcat6
(http://tomcat.apache.org/download-70.cgi)
mysql-server
(http://dev.mysql.com/downloads/)wget -O JavaBridge.war http://sourceforge.net/projects/php-java-bridge/files/Binary%20package/php-java-bridge_6.2.1/JavaBridgeTemplate621.war/download
- Download and extract Drupal,
change user.group ownership to tomcat6.tomcat6.
http://ftp.drupal.org/files/projects/drupal-7.0-rc4.tar.gzsudo chown -R tomcat6.tomcat6 drupal-7.0-rc4
- Download JavaBridge.war. (Which may include JavaBridge.jar).
- 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
- Test your PHP installation with:
If it is working ok with PHP-CGI then there should be no error. Otherwise see http://php-java-bridge.sourceforge.net/pjb/installation.php.java -classpath JavaBridge.jar TestInstallation
- 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
- Done! Visit http://localhost:8080/drupal and run through the Drupal installer.
No comments:
Post a Comment