Sun Java System Application Server 9.1 Installation Guide

ProcedureTo Install GlassFish Application Server

Before You Begin

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.

  1. Download the GlassFish v2 distribution 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

  4. Set ANT_HOME to point to the ant 1.6.5 installation, which is at <downloaded-dir>/glassfish/lib/ant directory.

  5. Navigate to the glassfish directory:

    cd glassfish

  6. If you do not want clustering capabilities, run the following command:

    ant -f setup.xml

    • If you want to use GlassFish with clustering, change the command to:

      ant -f setup-cluster.xml