Sun GlassFish Enterprise Server 2.1 Installation Guide

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.