|« SuSE Studio TestDrive: Slightly Customizing an Linux OpenSuSE 11.1||Providing 32-bit Application Support Under 64-bit GNU/Linux Fedora. »|
Note: this post is dedicated to the indigenous communities of Peru who are currently resisting an assault on their resources; they are defending the preservation of the natural environment that sustains their identity --and their right to exist with dignity as human beings.
Nanahuatzin illuminates through Cloud Computing scenarios.
I attended Sun MicroSystems CommunityOne event held on June 01, 2009, at the San Francisco Moscone center. Among the sessions that I selected was one by an Zmanda representative that, quite frankly, disappointed me because it was more marketing than the actual technical content described in the online catalog. Notwithstanding, there was another session, The Third Wave of Open: Open Source and Business Models by Sun's own Simon Phipps, with quite fascinating content. Thank you Simon, for the interesting perspective you provided: open source is pro-capitalism. If I were to draw a parallel in the peculiar notion of democracy practiced in the West, it would be that by lowering the technology adoption barriers to the masses, open source empowers the individual to undertake initiatives.
Visiting the exhibits area, I came across Glassfish, Sun's Java application server. What caught my attention, however, was the assertion written on the booth content boards: Glassfish supports PHP applications (among other more conventional ones). Intrigued, I approached one of the persons manning the booth and inquired about the PHP support in Glassfish. She pointed out that the support for PHP came as a result of the Quercus PHP module/servlet. Although this blog medium where I express myself is supported by an PHP component, I was unaware of the existence of an Java module/servlet enabling PHP support on Java based application servers. Hence, I asked her to write down the name of the module for me --I did not want to forget it-- and subsequently (after thanking her) continued on my stroll through the area.
It was not long before I came across Caucho's booth and once again my attention focused on their exhibit content that read ...Quercus Java [...] PHP enabler servlet! Well, although I was familiar with older versions of Resin, Caucho's own Java application server, it caught me by surprise that Caucho could create such a cool product --and more importantly-- it was open source software, as I later found out. Quercus was not tied to any specific vendor's product although the person manning Caucho's booth claimed that Quercus performed best on their own Resin Java application server. Well, perhaps, but recalling Sun's people asserting that Quercus executed in their Glassfish java application server, I wondered: would Quercus excecute on Apache Gernonimo and its IBM supported implementation, WebSphere Application Server Community Edition (WASCE)?
Downloading and Installing Geronimo and/or IBM WASCE Under GNU/Linux Debian.
Note: From here on, I will use interchangeably the terms IBM WebSphere Application Server (WASCE) and Apache Geronimo, as this last is the base for IBM's subscription based supported implementation.
Well I began my exploration of this project by downloading IBM's WASCE v184.108.40.206, the most current version of the Java application server at the time of this post.
You will be required to enter your user ID and/or prompted to register with IBM before access to the WASCE download area is made available. This is in contrast to Apache Geronimo v2.1.4 download where an user simply selects the version desired and downloads the application server.
Nevertheless, please note that IBM enhances the security and features of Apache Geronimo so as to offer fee-based support for those entities that do require business class support for their WASCE application server.
For this proof of concept, I used the IBM Java SE Version 6 SR4 32-bit xSeries (Intel Compatible).
On the other hand, the user may also elect to use Sun Microsystems Java SE Development Kit (SDK). For instance, in addition to the IBM implementation of Java, I also used Sun's SDK 6 Update 07. As an aside, Caucho's open source Resin Java application server versions 3.1.9 and 3.2.1 seem to operate with Sun Java SDK 6 but not with IBM Java SE 6. I did not test OpenJDK due to its less mature current state; I had no desire to introduce superfluous unknown variables.
Well, after downloading WASCE --IBM's implementation of Apache Geronimo-- to an temporary location and verifying that the file permissions are set to executable for the user Xiuhtecuhtli (who will be installing WASCE):
ls -l wasce_setup-220.127.116.11-unix.bin
-rwxr--r-- 1 xiuhtecuhtli xiuhtecuhtli 84052863 2009-06-03 23:41 wasce_setup-18.104.22.168-unix.bin
Xiuhtecuhtli commences the installation, in the current directory of the downloaded WASCE file, by typing at his shell:
And a purple splash screen appears while the installation utility makes necessary preparations for the Java application server setup:
Subsequently the Welcome screen appears and the user proceeds to press the next button:
The user accepts the license agreement and continues by selecting next:
The installation routine displays /opt/IBM/WebSphere/AppServerCommunityEdition as default installation path for Geronimo. If appropriate, the user selects the button to proceed. Otherwise, s/he should specify an alternate path with enough free disk space for the installation to proceed:
The WASCE installation routine analyzes relevant pre-installation parameters. Subsequently, the utility displays those to the user and prompts her to proceed if she agrees to the the data shown:
It takes a few minutes for the installation utility to complete its task. The user can see the approximate progress of the process:
Subsequently, the WASCE installation finishes and the user should simply press the button labeled Done.
At that instance, the screen disappears and WASCE is completely installed into Xiuhtecuhtli's GNU/Linux Debian system.
MySQL Connector/J Should be Installed First Since Apache Derby Java DB is Embedded by Default in Geronimo and WASCE.
There is generally very little information in the Web regarding the procedure to install MySQL RDBM support under Geronimo. Accordingly, the user may want to refer to WASCEWithMySQL post for an easy procedure to install the MySQL Connector/J into Geronimo --from the visual comfort of the Geronimo's admin console interface. The user will also realize that she needs to specify an appropriate deployment plan if the Quercus PHP module/servlet is to be installed successfully under Geronimo. The file specifying the deployment plan varies in naming conventions. For instance, what Caucho refers to as resin-web.xml Geronimo refers to as --what else? geronimo-web.xml. Please, do not deploy automatically your Quercus PHP module/servlet by copying it under Geronimo's deploy subdirectory, its installation directory path structure will vary and Geronimo will likely not be able to connect to the MySQL database on behalf of your PHP applications. You have been warned about it.
After downloading MySQL Connector/J 5.1, the official JDBC driver for MySQL, to an temporary location, Xiuhtecuhtli proceeds to expand the file mysql-connector-java-5.1.7.tar.gz as follows:
tar -xvpzPf mysql-connector-java-5.1.7.tar.gz
Evidently, at this specific moment in time, MySQL Connector/J version 5.1.7 is the most recent. Needless to say, the version should be adjusted in the future --as the rapid pace of open source component development continues. Hence, from the expanded resources, the file of interest is mysql-connector-java-5.1.7-bin.jar. This JAR file will enable our Geronimo Java application server to connect to MySQL databases on behalf of applications like the Quercus PHP module/servlet.
Assuming that mysql-connector-java-5.1.7-bin.jar has been placed at the directory workspace under Xiuhtecuhtli's home directory, then we would have:
Further, assuming that we have downloaded the Quercus PHP module/servlet from Caucho's pertinent repository,
then we should place the quercus-3.2.1.war at this same location. And we would have, then, these two(2) files:
Now we should create the deployment plan file for WASCE, we should create an geronimo-web.xml to guide Geronimo application server into installing the Quercus PHP module/servlet at an specific path --later, when we are ready to install it. This is important because if the installation path is variable --as it usually occurs when using the automatic deployment vehicle offered by Geronimo for certain WAR applications.
Had we downloaded and installed the open source Apache Geronimo application server, that is, not the IBM implementation, then upon accessing the application server through the web interface we would have noticed an hint of the format of the geronimo-web.xml file:
Although I have made available the geronimo-web.xml deployment plan file, please note that it is essentially a minimalistic composition of the fragment suggested in the above default page and the subsequent hint that we will be provided as we install the MySQL Connector/J. Additionally, please note that geronimo-web.xml is particular to versions of components used in this proof of concept case and may need to be modified to accommodate users' technology variations now and in the future.
Starting Up IBM WASCE From Within GNU/Linux Debian Bash Shell.
Having accepted the default path for the installation of WebSphere Application Server CE, Xiuhtecuhtli changes location to the WASCE bin executable directory:
Once there, he types:
(sample output fragment to the shell)
Booting Server Kernel (in Java 1.6.0)...
Listening on Ports:
1050 0.0.0.0 CORBA Naming Service
1099 0.0.0.0 RMI Naming
1527 0.0.0.0 Derby Connector
2001 0.0.0.0 OpenEJB ORB Adapter
4201 0.0.0.0 OpenEJB Daemon
6882 0.0.0.0 OpenEJB ORB Adapter
8009 0.0.0.0 Tomcat Connector AJP AJP
8080 0.0.0.0 Tomcat Connector HTTP BIO HTTP
8443 0.0.0.0 Tomcat Connector HTTPS BIO HTTPS
9999 0.0.0.0 JMX Remoting Connector
61613 0.0.0.0 ActiveMQ Transport Connector
61616 0.0.0.0 ActiveMQ Transport Connector
Hence, we should connect to our test machine localhost, at the port 8080, with our favorite browser. In this particular case I selected Epiphany web browser for Gnome:
Please note, in the above screenshot, the hilited Administrative Console icon on the left pane; if we subsequently select that, we will be taken to Geronimo's Log in web page. Proceed to enter the default Log in values for WASCE:
In an production system, of course, those should be set to stronger values; now, press the button labeled Log in. We should now be welcomed once more --but this time by the Administration Console! Please, observe the column on the left pane and direct your attention to the (pointed) Repository icon, under the Services folder.
Selecting (by pressing) the Repository icon, the user is enabled to Add [an] Archive to Repository --in addition to being able to examine current Repository Entries.
This is exactly what we will do so as to verify that, in effect, MySQL Connector/J will be installed. Scroll down the page and analyze the existing Repository entries: there is likely no entry that starts with the letter "m" much less the mysql-connector-java-x.x.x-bin.jar:
Accordingly, after scrolling back to the Add Archive to Repository section, Xiuhtecuhtli presses the button labeled Browse and, from the ensuing dialog, the file:
is selected and Xiuhtecuhtli proceeds to press the button labeled Open.
Subsequently Xiuhtecuhtli is returned back to the Repository Viewer; however, the user realizes that all the fields under Add Archive to Repository have been assigned values automatically --with the exception of the second field from the top. It is most important that in this empty field the user enters: mysql. If the user leaves this field blank (or enters another value) the geronimo-web.xml deployment plan that I make available here needs to be modified to reflect the change; otherwise Geronimo's MySQL connection on behalf of an hosted application may not work.
Assuming that the value in question (in the second field from the top) is mysql, the user should press the button labeled install.
After a few seconds, the fields will go blank once again without apparent indication that anything was installed. Hence, the user/admin should scroll down once again to verify that an entry similar to:
is listed and thus installed in the Repository, as in the example screenshot shown below.
Installing Caucho's Quercus Java PHP module/servlet Into WASCE/Geronimo Application Server.
Now that we have an minimal geronimo-web.xml deployment plan, we can proceed to install the Quercus Java PHP enabler module/servlet. At the Geronimo's Admin console interface, select (pointed) Deploy New from the Connectors section, under the left column pane labeled: Console Navigation. Alternatively, the user may select Deploy New Applications under the Common Console Actions box located in the upper right of the Admin console interface.
The user will be taken to the Admin console section labeled Install New Applications. In the field next to Archive:, Xiuhtecuhtli browses to his home workspace directory location and selects the quercus-3.2.1.war file. He then proceeds to browse and find the geronimo-web.xml deployment plan file,
which he then places in the field next to Plan:.
After the user presses the button labeled Install, the fields become empty again; however, we are notified that the application was successfully deployed and started.
Noticing the line directive in the geronimo-web.xml deployment plan file that reads:
we proceed to point our browser to
Indeed, the Quercus 3.2.1 PHP module/servlet test page appears in our browser:
And we can see that our deployment plan successfully directed our Geronimo Java application server to install Quercus under our repository directory:
Installing B2evolution 3.x-Beta --an Test PHP Web Application-- Into Caucho's Quercus 3.2.1 on IBM WASCE 22.214.171.124 or Apache Geronimo v2.1.4
The Multi-blog & Advanced Blogging Software b2evolution version 3.2.0-beta is rapidly approaching stable general availability. What better way to test that excellent open source software than to install it into Quercus in our Geronimo Java application server?
After creating an database named Geronimo_b2evo3b in MySQL, we proceed to extract the b2evolution 3.x-beta zipped download into an temporary directory. First we change our file system location to WASCE / Geronimo home base directory:
Subsequently we proceed to change location to the appropriate Quercus 3.2.1 location:
At this file system location we copy b2evolution 3.x-beta blogs directory. Accordingly we have:
From now on, we proceed as we would normally install an b2evolution instance into an regular (GNU/)Linux, Apache, MySQL, and PHP (LAMP) stack. Hence, we point our browser to
http://localhost:8080/quercus-3.2.1/blogs/install/ and Xiuhtecuhtli proceeds to enter pertinent information in the fields:
After the user selects Update config file b2evolution 3.x-beta routine performs its own checks for the validity of the information entered in the fields. Since Xiuhtecuhtli is the light in darkness , he obviously can not make a mistake and the b2evolution 3.x-beta continues to the next dialog: How do you want to install b2evolution? The New install option in addition to the sample content blogs are selected; the user selects the GO! button.
B2evolution 3.x-beta successfully installs into Caucho's Java Quercus 3.2.1 PHP module/servlet being hosted on WASCE / Geronimo.
Accordingly, we proceed to log into the administration backoffice with the temporary random credentials; these should be modified in production systems immediately after log in.
However, after we are allowed in, the very first screen shows b2evolution's Global information tab, found under the Dashboard menu, with issues presumably related to the strings, proper formatting, etc.:
Before the question arises relevant as to whether Caucho's own Resin Java application server might enable b2evolution to function properly, the answer is that Resin versions 3.1.9 and 3.2.1 made no difference. For instance, below is an snapshot of Resin 3.2.1 with b2evolution 3.x-beta installed; it is the a view of one of the example blogs:
And the next snapshot is from b2evolution 3.x-beta Admin Backoffice --when the user selects Files from the menu bar:
Moreover, from the left pane labeled Console Navigation of WASCE Administrative Console, by selecting the Info section and subsequently Web Server, I proceed to select the TomcatWebConnector Edit option. Xiuhtecuhtli modified the section uriEncoding field, found in Network Listeners under the Web Server Manager, to UTF-8 or ISO-8859-1 with no apparent improvement. I have tried an similar procedure under Resin to no avail.
Evidently, Caucho's Quercus Java PHP enabler module/servlet is an cool idea, notwithstanding it needs further refinement work if it is to be widely adopted as an more secure alternative to existing non-Java PHP implementations.
NOTE The elaborated opinions expressed do not necessarily reflect those of Metztli Information Technology as a whole.
Suggestion code for commands entered at the GNU/Linux shell prompt and/or resources, like the sample/test geronimo-web.xml deployment plan file, are provided on an AS-IS basis. Although due diligence has been applied, the information may not be accurate under all circumstances.
By reading, analyzing, or using, the information provided at Metztli Information Technology and its associates, individual(s) and/or entity(ies) assume all risk. Consequently, please do not hold Metztli IT responsible if unforeseen effects are experienced. You are not obliged to use the information provided.
Metztli IT reserves the right to modify the procedure --including deleting the blog entry.
Form is loading...