This month's menu is Apache Geronimo, please prepare the kitchen, let's cook a table feast. Every good chef has his own knack for setting up the kitchen. Let's start with where we cook--an X-based virtual network Computing (VNC) server (XVNC) session on the linux® server.
Not a chef? Don't worry. This article provides hands-on guidance on how to build and run Geronimo within minutes. And it's wonderful that no utensils need to be cleaned after these dishes are finished.
Note: This article assumes that Red Hat Linux is running on the server and that the monitor screen size is 1024 x 768. File locations may be different on other versions of Linux.
The minimum setting for cooking sites is two xterm windows and a few other tools that make it instructive and interesting to work under the XVNC session. With these in mind, perform the following steps:
Open a xterm window on the server and enter the directory $HOME/.vnc. A file called Xstartup will be found there.
Rename the file to Xstartup.original and save it, and then start your favorite editor and create a new Xstartup file with the content shown in Listing 1.
Listing 1. Contents of Xstartup File
#!/bin/sh
xterm -g 135x20+0+0 &
xterm -g 135x30+0+300 &
xclock -g +840+0 -digital -update 1 &
xclock -g +840+65 -update 1 &
xload -g +840+265 &
twm &
Now, run Vncserver to start the XVNC session, minimize the server's xterm window (you can make this session more durable in any of several ways, but this is beyond the scope of this article.) )
Next, start the VNC Viewer program on your computer and connect to the server.
When you run a XVNC session on your computer, the kitchen is set up, and then you can start preparing the ingredients. A good way to use the system is to use the Xterm window in the upper half of the. man file and other documents to use a larger lower half xterm window for the workspace that executes the installation command, builds the command, and tests the system commands.
Java Environment
Once the kitchen is set up, you must download and install one of the ingredients that are common to two recipes: the Java Software Development Kit (Java Software Development kit,sdk). At least Java 1.4.2 is required, which can be downloaded at the Sun Microsystems Web site. The required file is J2sdk-1_4_2_11-nb-5_0-linux.bin.
To install this file, you must become a superuser, make the file executable, and then execute the file. The code in Listing 2 outlines this process.
Listing 2. Installing the Java SDK
$ su
Password: <root password>
# chmod +x j2sdk-1_4_2_11-nb-5_0-linux.bin
# ./j2sdk-1_4_2_11-nb-5_0-linux.bin
This code is used to run the installer, and when you're done, you have a good Java toolkit for building and testing Geronimo. However, before you use the toolkit, you must perform the last step. Add the following line of code to the $HOME/.BASHRC file so that you can (1) enable the Shell to access the toolkit to use the updated Java binaries, and (2) define where the Geronimo code locates the Java Runtime environment (JRE):
export PATH=/opt/j2sdk1.4.2_11/bin:$PATH
export JAVA_HOME=/opt/j2sdk1.4.2_11/jre