This section provides instructions for installing GlassFish v2 distribution and for installing the load balancing plug-in for GlassFish v2. This distribution does not support upgrades or patching.
Get JDK (Java SE Developerment Kit) 5 or higher from http://java.sun.com/javase/, if you are using Solaris, Linux, or Windows..
If you are using Mac OS X, you need to download JDK 5 (supported on Mac OS X 1.4 or later) from http://www.apple.com/support/downloads/java2se50release3.html and make JDK 5 the default JVM.
Download the GlassFish v2 distribution https://glassfish.dev.java.net/public/downloadsindex.html.
Set the environment variable JAVA_HOME to point to the directory in which JDK 5 is installed.
Run the following command:
java -Xmx256m -jar <filename>.jar
Set ANT_HOME to point to the ant 1.6.5 installation, which is at <downloaded-dir>/glassfish/lib/ant directory.
Navigate to the glassfish directory:
cd glassfish
If you do not want clustering capabilities, run the following command:
ant -f setup.xml
Use the procedures in this section if the load balancing plug-in is not part of the Application Server distribution you are using. If you are using the Sun Java System Application Server 9.1 (bundle with HADB), see To Install Application Server 9.1 with HADB for instructions for installing the load balancing plug-in.
The load balancing plug-in is not currently bundled with the GlassFish v2Application Server. If you want load balancing capabilities, you can download the load balancing plug-in from the following locations:
Solaris (SPARC): http://download.java.net/javaee5/external/SunOS/aslb/jars/
Solaris (x86): http://download.java.net/javaee5/external/SunOS_X86/aslb/jars/
Linux: http://download.java.net/javaee5/external/Linux/aslb/jars/
Windows: http://download.java.net/javaee5/external/WINNT/aslb/jars/
Mac OS: http://download.java.net/javaee5/external/Darwin/aslb/jars/
Before you install the load balancer plug-in, ensure that you have installed a supported web server. For a list of supported web servers, see Web Servers in Sun Java System Application Server 9.1 Release Notes.
Create the lbplugin directory within <glassfish_install_dir>/lib.
Unjar this file in the lbplugin directory. Run the following command: jar -xvf <lbplugin>.jar.
Unzip the following two files: SUNWaslb.zip and SUNWaspx.zip in the same directory. Delete the zip files.
Change permissions on all shared libraries within lbplugin directory. Run the following command: chmod -R 755 ${glassfish.home}/lib/lbplugin/lib.
Create a configuration for the load balancer. See Setting up Load Balancing in Sun Java System Application Server 9.1 Quick Start Guide.
Restart the Web Server after creating a configuration for the load balancer.
You need to configure Web Server for load balancing. For detailed instructions on manually configuring Web Server for load balancing, see Configuring Sun Java System Web Server in Sun Java System Application Server 9.1 High Availability Administration Guide.