I'll show you in this article how to setup the CMS Joomla on Glassfish. We won't need Apache for this one. There are few ways to do PHP on a J2EE server. I'll describe what I think the easiest way. First we will need to download and install PHP using PHP/JavaBridge (or you can use Quercus too here the link http://quercus.caucho.com/.
You can download PHP from this site http://www.php.net/downloads.php . I recommend to install it by the installer (if you use Windows).
After that you install PHP, you will have to add a system variable : PHP_HOME=path of php installation (ex : PHP_HOME=c:\php). You also need to add PHP in your path : (Windows : ;%PHP_HOME% ).
Now download the project PHP/JavaBridge from there web site : http://php-java-bridge.sourceforge.net/doc/ . Once you have the zip file of the project, you will have to extract it. You will obtain a file named : JavaBridge.war with others, but this file is the most important for the following steps.
Now that we have PHP install and the PHP/JavaBridge project, we can now starts intalling Joomla on Glassfish. Like I said in the beginning, I choose the most easiest way, so it's not the most efficiant, (will you understand when you will see the next steps), but it will show you how it's done.
Extract the file JavaBridge.war (Follow the same procedure for Quercus). Now copy the files and folders that are in the root of your Joomla site. Example : htdocs/joomla/ into the JavaBridge folder. (or copy the folder joomla into JavaBridge/Joomla but that will require more setup to do in Glassfish if you don't want to URL to contain .../Joomla. I won't convert it in this article).
Here the complete list of the files and folder into my JavaBridge folder. (of course that need a cleanup, but it's just to show you that it can be done)
.htaccess
administrator
cache
CHANGELOG.php
components
configuration.php
configuration.php-dist
COPYRIGHT.php
CREDITS.php
documentClient.php
excel.php
hello.php
htaccess.txt
images
includes
index.php
index2.php
info.php
INSTALL.php
installation_
java
jsp+php.jsp
jsr223.jsp
language
libraries
LICENSE.php
LICENSES.php
locale
logs
MANIFEST.MF
media
metaconfig.xml
modules
numberguess.jsp
numberguess.php
plugins
robots.txt
sessionSharing.jsp
sessionSharing.php
settings.php
sitemap.xml
source.php
T.TXT
templates
test
test.php
TestInstallation$1.class
TestInstallation$2.class
TestInstallation$SimpleBrowser.class
TestInstallation.class
tmp
WEB-INF
xmlrpc
After that you obtain this ugly structure... compress it back into a .war. I'll named it JavaBridge2.war.
Now the last step. Deploy it on Glassfish. Log into the admin web page and select deploy a war. Browse for JavaBridge2.war and deploy it.
Let take a look of the admin of Glassfish once JavaBridge2.war is deployed.
and the final touch.. See Joomla Live on Glassfish my entered the URL : http://localhost:8888/JavaBridge2 (8888 is my port of GF.. your should be 8080)
I hope that can help you to see are easy it can be to do PHP into Glassfish. The next step should be to benchmark Joomla on Glassfish with JavaBridge VS Joomla on Apache.
| Comments |
|















