Sun GlassFish Enterprise Server v2.1.1 Installation Guide

Installing Sun GlassFish Enterprise Server With JAR-based Installer

This section provides instructions for installing GlassFishdistribution, which is available as a JAR-based installer..

ProcedureTo Install Sun GlassFish Enterprise Server With JAR-Based Installer

Before You Begin

Get JDK 5 Update 14 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 from http://developer.apple.com/java/download/ and make JDK the default JVM.

If you are using AIX, you need to download JDK from http://www.ibm.com/developerworks/systems/library/es-JavaOnAix_install.html and make JDK the default JVM.

  1. Download the GlassFish v2.1 distribution from https://glassfish.dev.java.net/public/downloadsindex.html.

  2. Set the environment variable JAVA_HOME to point to the directory in which JDK 5 is installed.

  3. Run the following command:

    java -Xmx256m -jar filename.jar


    Note –

    If you have trouble running this command, run this command with a higher —Xmx value. Example, java -Xmx512m -jar filename.jar


  4. Navigate to the glassfish directory:

    cd glassfish

  5. If you are using operating system that is a derivative of UNIX:

    chmod -R +x lib/ant/bin

  6. Run one of the following commands:

    • If you want GlassFish with clustering, run the following command:

      lib/ant/bin/ant -f setup-cluster.xml

      Or, for Windows: lib\ant\bin\ant -f setup-cluster.xml

    • If you want GlassFish without clustering, run the following command:

      lib/ant/bin/ant -f setup.xml

      Or, for Windows: lib\ant\bin\ant -f setup.xml

  7. Use the Admin Console to register your installation of GlassFish. Start GlassFish using the instructions in the Quick Start guide.

ProcedureTo Install the Load Balancing Plug-in (standalone)

Use the procedures in this section if the load balancing plug-in is not part of the GlassFish Communications Server distribution you are using.

The load balancing plug-in is not currently bundled with the GlassFish v2GlassFish Communications Server. If you want load balancing capabilities, you can download the load balancing plug-in from the following locations:

  1. 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 GlassFish Enterprise Server v2.1.1 Release Notes.

    Ensure that you have exported the certificate required during installation. For details, see TBDlink.

  2. Create the lbplugin directory within <glassfish_install_dir>/lib.

  3. Unjar this file in the lbplugin directory. Run the following command: jar -xvf <lbplugin>.jar.

  4. Unzip the following two files: SUNWaslb.zip and SUNWaspx.zip in the same directory. Delete the zip files.

  5. Change permissions on all shared libraries within lbplugin directory. Run the following command: chmod -R 755 ${glassfish.home}/lib/lbplugin/lib.

  6. Create a configuration for the load balancer. See Setting up Load Balancing in Sun GlassFish Enterprise Server v2.1.1 Quick Start Guide.

  7. Restart the Web Server after creating a configuration for the load balancer.

Next Steps

You need to configure Web Server for load balancing. For detailed instructions on manually configuring Web Server for load balancing, see Configuring Sun Web Server in Sun GlassFish Enterprise Server v2.1.1 High Availability Administration Guide.