GlassFishServerOpenSource Edition3.1InstallationGuide

bravesnailsSoftware and s/w Development

Jun 7, 2012 (5 years and 4 months ago)

565 views

GlassFishServer OpenSource
Edition3.1InstallationGuide
Oracle Corporation
500 Oracle Parkway
Redwood City,CA94065
U.S.A.
Part No:821–2453–12
July 2011
Copyright ©2010,2011,Oracle and/or its affiliates.All rights reserved.
This software and related documentationare provided under a license agreement containing restrictions onuse and disclosure and are protected by intellectual
property laws.Except as expressly permitted inyour license agreement or allowed by law,you may not use,copy,reproduce,translate,broadcast,modify,license,
transmit,distribute,exhibit,perform,publish or display any part,inany form,or by any means.Reverse engineering,disassembly,or decompilationof this software,
unless required by lawfor interoperability,is prohibited.
The informationcontained hereinis subject to change without notice and is not warranted to be error-free.If you find any errors,please report themto us inwriting.
If this is software or related documentationthat is delivered to the U.S.Government or anyone licensing it onbehalf of the U.S.Government,the following notice is
applicable:
U.S.GOVERNMENTRIGHTS
Programs,software,databases,and related documentationand technical data delivered to U.S.Government customers are"commercial computer software"or
"commercial technical data"pursuant to the applicable Federal AcquisitionRegulationand agency-specific supplemental regulations.As such,the use,duplication,
disclosure,modification,and adaptationshall be subject to the restrictions and license terms set forth inthe applicable Government contract,and,to the extent
applicable by the terms of the Government contract,the additional rights set forth inFAR52.227-19,Commercial Computer Software License (December 2007).
Oracle America,Inc.,500 Oracle Parkway,Redwood City,CA94065.
This software or hardware is developed for general use ina variety of informationmanagement applications.It is not developed or intended for use inany inherently
dangerous applications,including applications that may create a risk of personal injury.If you use this software or hardware indangerous applications,thenyou shall
be responsible to take all appropriate fail-safe,backup,redundancy,and other measures to ensure its safe use.Oracle Corporationand its affiliates disclaimany
liability for any damages caused by use of this software or hardware indangerous applications.
Oracle and Java are registered trademarks of Oracle and/or its affiliates.Other names may be trademarks of their respective owners.
Intel and Intel Xeonare trademarks or registered trademarks of Intel Corporation.All SPARCtrademarks are used under license and are trademarks or registered
trademarks of SPARCInternational,Inc.AMD,Opteron,the AMDlogo,and the AMDOpteronlogo are trademarks or registered trademarks of Advanced Micro
Devices.UNIXis a registered trademark of The OpenGroup.
This software or hardware and documentationmay provide access to or informationoncontent,products,and services fromthird parties.Oracle Corporationand
its affiliates are not responsible for and expressly disclaimall warranties of any kind with respect to third-party content,products,and services.Oracle Corporation
and its affiliates will not be responsible for any loss,costs,or damages incurred due to your access to or use of third-party content,products,or services.
110725@25097
Contents
Preface.....................................................................................................................................................5
1 InstallingGlassFishServer 3.1..........................................................................................................13
InstallationRequirements..................................................................................................................13
Javassist Library License Notice.................................................................................................14
InstallationFiles for GlassFish Server 3.1.........................................................................................21
GlassFish Server Download Locations......................................................................................22
GlassFish Server InstallationMethods......................................................................................22
Choosing anInstallationMethod..............................................................................................22
GlassFish Server ZIPFiles...........................................................................................................25
GlassFish Server Self-Extracting Bundles.................................................................................26
Installing GlassFish Server Froma ZIPFile......................................................................................26
▼To Install GlassFish Server Using the ZIPFile..........................................................................26
Installing GlassFish Server Froma Self-Extracting Bundle............................................................27
▼To Install GlassFish Server Using the Self-Extracting File......................................................28
▼To Performa CustomInstallation.............................................................................................31
CustomConfigurationParameters............................................................................................34
Performing a Silent Mode Installation..............................................................................................37
Creating the InstallationAnswer File........................................................................................37
Reviewing the InstallationAnswer File.....................................................................................40
Installing inSilent Mode.............................................................................................................43
InstallationCommand-Line Options...............................................................................................44
2 UninstallingGlassFishServer 3.1.....................................................................................................45
Removing a GlassFish Server Installation........................................................................................45
▼To Uninstall GlassFish Server Software After a ZIPFile Installation....................................45
▼To Uninstall GlassFish Server Software After a GUI-Mode Installation..............................46
3
Index......................................................................................................................................................49
Contents
GlassFishServer OpenSource Edition3.1InstallationGuide • July 20114
Preface
This document contains instructions for installing and uninstalling GlassFish Server Open
Source Edition3.1 software.
This preface contains informationabout and conventions for the entire GlassFish Server Open
Source Edition(GlassFish Server) documentationset.
GlassFish Server 3.1 is developed through the GlassFish project open-source community at
http://glassfish.java.net/
.The GlassFish project provides a structured process for
developing the GlassFish Server platformthat makes the newfeatures of the Java EEplatform
available faster,while maintaining the most important feature of Java EE:compatibility.It
enables Java developers to access the GlassFish Server source code and to contribute to the
development of the GlassFish Server.The GlassFish project is designed to encourage
communicationbetweenOracle engineers and the community.
The following topics are addressed here:

“GlassFish Server DocumentationSet” onpage 5

“Related Documentation” onpage 7

“Typographic Conventions” onpage 8

“Symbol Conventions” onpage 9

“Default Paths and File Names” onpage 9

“Documentation,Support,and Training” onpage 10

“Searching Oracle Product Documentation” onpage 10

“Third-Party Web Site References” onpage 11
GlassFishServer DocumentationSet
The GlassFish Server documentationset describes deployment planning and system
installation.For anintroductionto GlassFish Server,refer to the books inthe order inwhich
they are listed inthe following table.
5
TABLE P–1
Books inthe GlassFishServer DocumentationSet
BookTitle Description
Release Notes Provides late-breaking informationabout the software and the
documentationand includes a comprehensive,table-based summary of the
supported hardware,operating system,Java Development Kit (JDK),and
database drivers.
Quick Start Guide Explains howto get started with the GlassFish Server product.
Installation Guide Explains howto install the software and its components.
Upgrade Guide Explains howto upgrade to the latest versionof GlassFish Server.This guide
also describes differences betweenadjacent product releases and
configurationoptions that canresult inincompatibility with the product
specifications.
Deployment Planning Guide Explains howto build a productiondeployment of GlassFish Server that
meets the requirements of your systemand enterprise.
Administration Guide Explains howto configure,monitor,and manage GlassFish Server
subsystems and components fromthe command line by using the
asadmin(1M) utility.Instructions for performing these tasks fromthe
AdministrationConsole are provided inthe AdministrationConsole online
help.
Security Guide Provides instructions for configuring and administering GlassFish Server
security.
Application Deployment Guide Explains howto assemble and deploy applications to the GlassFish Server
and provides informationabout deployment descriptors.
Application Development Guide Explains howto create and implement Java Platform,Enterprise Edition
(Java EEplatform) applications that are intended to runonthe GlassFish
Server.These applications followthe openJava standards model for Java EE
components and applicationprogrammer interfaces (APIs).This guide
provides informationabout developer tools,security,and debugging.
Add-On Component
Development Guide
Explains howto use published interfaces of GlassFish Server to develop
add-oncomponents for GlassFish Server.This document explains howto
performonly those tasks that ensure that the add-oncomponent is suitable
for GlassFish Server.
Embedded Server Guide Explains howto runapplications inembedded GlassFish Server and to
develop applications inwhich GlassFish Server is embedded.
High Availability
Administration Guide
Explains howto configure GlassFish Server to provide higher availability and
scalability through failover and load balancing.
Performance Tuning Guide Explains howto optimize the performance of GlassFish Server.
Preface
GlassFishServer OpenSource Edition3.1InstallationGuide • July 20116
TABLE P–1
Books inthe GlassFishServer DocumentationSet (Continued)
BookTitle Description
Troubleshooting Guide Describes commonproblems that you might encounter whenusing
GlassFish Server and explains howto solve them.
Error Message Reference Describes error messages that you might encounter whenusing GlassFish
Server.
Reference Manual Provides reference informationinmanpage format for GlassFish Server
administrationcommands,utility commands,and related concepts.
Message Queue Release Notes Describes newfeatures,compatibility issues,and existing bugs for Open
Message Queue.
Message Queue Technical
Overview
Provides anintroductionto the technology,concepts,architecture,
capabilities,and features of the Message Queue messaging service.
Message Queue Administration
Guide
Explains howto set up and manage a Message Queue messaging system.
Message Queue Developer’s
Guide for JMXClients
Describes the applicationprogramming interface inMessage Queue for
programmatically configuring and monitoring Message Queue resources in
conformance with the Java Management Extensions (JMX).
Message Queue Developer’s
Guide for Java Clients
Provides informationabout concepts and procedures for developing Java
messaging applications (Java clients) that work with GlassFish Server.
Message Queue Developer’s
Guide for CClients
Provides programming and reference informationfor developers working
with Message Queue who want to use the Clanguage binding to the Message
Queue messaging service to send,receive,and process Message Queue
messages.
RelatedDocumentation
The following tutorials explainhowto develop Java EEapplications:

Your First Cup:An Introduction to the Java EEPlatform(http://download.oracle.com/
javaee/6/firstcup/doc/)
.For beginning Java EEprogrammers,this short tutorial
explains the entire process for developing a simple enterprise application.The sample
applicationis a web applicationthat consists of a component that is based onthe Enterprise
JavaBeans specification,a JAX-RS web service,and a JavaServer Faces component for the
web front end.

The Java EE6 Tutorial (http://download.oracle.com/javaee/6/tutorial/doc/)
.This
comprehensive tutorial explains howto use Java EE6 platformtechnologies and APIs to
develop Java EEapplications.
Preface
7
Javadoc tool reference documentationfor packages that are provided with GlassFish Server is
available as follows.

The API specificationfor version6 of Java EEis located at
http://download.oracle.com/
javaee/6/api/
.

The API specificationfor GlassFish Server 3.1,including Java EE6 platformpackages and
nonplatformpackages that are specific to the GlassFish Server product,is located at
http://glassfish.java.net/nonav/docs/v3/api/
.
Additionally,the
Java EESpecifications (http://www.oracle.com/technetwork/java/
javaee/tech/index.html)
might be useful.
For informationabout creating enterprise applications inthe NetBeans Integrated
Development Environment (IDE),see the
NetBeans Documentation,Training &Support page
(http://www.netbeans.org/kb/)
.
For informationabout the Java DBdatabase for use with the GlassFish Server,see the
Java DB
product page (http://www.oracle.com/technetwork/java/javadb/overview/index.html)
.
The Java EESamples project is a collectionof sample applications that demonstrate a broad
range of Java EEtechnologies.The Java EESamples are bundled with the Java EESoftware
Development Kit (SDK) and are also available fromthe
Java EESamples project page
(http://java.net/projects/glassfish-samples)
.
Typographic Conventions
The following table describes the typographic changes that are used inthis book.
TABLE P–2
TypographicConventions
Typeface Meaning Example
AaBbCc123 The names of commands,files,and
directories,and onscreencomputer
output
Edit your.login file.
Use ls -a to list all files.
machine_name% you have mail.
AaBbCc123 What you type,contrasted with onscreen
computer output
machine_name% su
Password:
AaBbCc123 Aplaceholder to be replaced with a real
name or value
The command to remove a file is rm filename.
AaBbCc123 Book titles,newterms,and terms to be
emphasized (note that some emphasized
items appear bold online)
Read Chapter 6 inthe User’s Guide.
Acache is a copy that is stored locally.
Do not save the file.
Preface
GlassFishServer OpenSource Edition3.1InstallationGuide • July 20118
Symbol Conventions
The following table explains symbols that might be used inthis book.
TABLE P–3
Symbol Conventions
Symbol Description Example Meaning
[ ] Contains optional arguments
and command options.
ls [-l] The -l optionis not required.
{ | } Contains a set of choices for a
required command option.
-d {y|n} The -d optionrequires that you use
either the y argument or the n
argument.
${ } Indicates a variable
reference.
${com.sun.javaRoot} References the value of the
com.sun.javaRoot variable.
- Joins simultaneous multiple
keystrokes.
Control-A Press the Control key while you press
the Akey.
+ Joins consecutive multiple
keystrokes.
Ctrl+A+N Press the Control key,release it,and
thenpress the subsequent keys.
→ Indicates menu item
selectionina graphical user
interface.
File →New→Templates Fromthe File menu,choose New.
Fromthe Newsubmenu,choose
Templates.
Default Paths andFileNames
The following table describes the default paths and file names that are used inthis book.
TABLE P–4
Default Paths andFile Names
Placeholder Description Default Value
as-install Represents the base installationdirectory for
GlassFish Server.
Inconfigurationfiles,as-install is represented
as follows:
${com.sun.aas.installRoot}
Installations onthe Oracle Solaris operating system,Linux
operating system,and Mac OS operating system:
user’s-home-directory/glassfish3/glassfish
Windows,all installations:
SystemDrive:\glassfish3\glassfish
Preface
9
TABLE P–4
Default Paths andFile Names (Continued)
Placeholder Description Default Value
as-install-parent Represents the parent of the base installation
directory for GlassFish Server.
Installations onthe Oracle Solaris operating system,Linux
operating system,and Mac operating system:
user’s-home-directory/glassfish3
Windows,all installations:
SystemDrive:\glassfish3
domain-root-dir Represents the directory inwhich a domainis
created by default.
as-install/domains/
domain-dir Represents the directory inwhich a domain's
configurationis stored.
Inconfigurationfiles,domain-dir is
represented as follows:
${com.sun.aas.instanceRoot}
domain-root-dir/domain-name
Documentation,Support,andTraining
The Oracle web site provides informationabout the following additional resources:

Documentation(http://www.oracle.com/technetwork/indexes/documentation/
index.html)

Support (http://www.oracle.com/us/support/index.html)

Training (http://education.oracle.com/)
SearchingOracleProduct Documentation
Besides searching Oracle product documentationfromthe
Oracle Documentation
(http://www.oracle.com/technetwork/indexes/documentation/index.html)
web site,you
canuse a search engine by typing the following syntax inthe search field:
search-term site:oracle.com
For example,to search for “broker,” type the following:
broker site:oracle.com
Preface
GlassFishServer OpenSource Edition3.1InstallationGuide • July 201110
Third-PartyWebSiteReferences
Third-party URLs are referenced inthis document and provide additional,related information.
Note –
Oracle is not responsible for the availability of third-party web sites mentionedinthis
document.Oracle does not endorse and is not responsible or liable for any content,advertising,
products,or other materials that are available onor through such sites or resources.Oracle will
not be responsible or liable for any actual or alleged damage or loss caused or alleged to be
caused by or inconnectionwith use of or reliance onany such content,goods,or services that
are available onor through such sites or resources.
Preface
11
12
InstallingGlassFishServer 3.1
This chapter provides instructions for installing GlassFish Server OpenSource Edition3.1
software onSolaris,Linux,Mac OS X,and Windows systems.
The following topics are addressed here:

“InstallationRequirements” onpage 13

“InstallationFiles for GlassFish Server 3.1” onpage 21

“Installing GlassFish Server Froma ZIPFile” onpage 26

“Installing GlassFish Server Froma Self-Extracting Bundle” onpage 27

“Performing a Silent Mode Installation” onpage 37

“InstallationCommand-Line Options” onpage 44
InstallationRequirements
Before installing GlassFish Server OpenSource Edition3.1,ensure that your systemmeets the
requirements listed in“Hardware and Software Requirements” in GlassFish Server Open Source
Edition 3.1-3.1.1 Release Notes.If necessary,download and install the required JDKsoftware.
Problems are likely to arise if you attempt to install ona platformthat is not supported or ona
systemthat insome other way does not meet release requirements.Also see “KnownIssues” in
GlassFish Server Open Source Edition 3.1-3.1.1 Release Notes for knownissues related to
installation.

OnSolaris,Linux,and Windows systems,JDKsoftware is available fromthe
Java SE
downloads page
.

For Mac OS Xsystems,GlassFish Server uses the JDKthat is part of the Macintosh operating
system.If necessary,obtainthe required JDKversionfromthe
Mac OS XUpdates site
.
1
C H A P T E R 1
13
Javassist LibraryLicenseNotice
You are receiving a copy of the Javassist (Java Programming Assistant) Library insource format
http://repo1.maven.org/
maven2/org/javassist/javassist/3.14.0-GA/javassist-3.14.0-GA-sources.jar
and in
object code forminthe jar file glassfish/modules/weld-osgi-bundle.jar included with the
distribution.The terms of the Oracle license do NOTapply to the Javassist (Java Programming
Assistant) program;it is licensed under the following license,separately fromthe Oracle
programs you receive.If you do not wish to install this program,you may choose to not proceed
with the installationof Oracle GlassFish Server.
GNULESSERGENERAL PUBLICLICENSEVersion2.1,February 1999
Copyright (C) 1991,1999 Free Software Foundation,Inc.51 FranklinStreet,Fifth Floor,
Boston,MA02110-1301 USAEveryone is permitted to copy and distribute verbatim
copies of this license document,but changing it is not allowed.[This is the first released
versionof the Lesser GPL.It also counts as the successor of the GNULibrary Public
License,version2,hence the versionnumber 2.1.] Preamble The licenses for most
software are designed to take away your freedomto share and change it.By contrast,the
GNUGeneral Public Licenses are intended to guarantee your freedomto share and
change free software--to make sure the software is free for all its users.
This license,the Lesser General Public License,applies to some specially designated
software packages--typically libraries--of the Free Software Foundationand other
authors who decide to use it.You canuse it too,but we suggest you first think carefully
about whether this license or the ordinary General Public License is the better strategy to
use inany particular case,based onthe explanations below.Whenwe speak of free
software,we are referring to freedomof use,not price.Our General Public Licenses are
designed to make sure that you have the freedomto distribute copies of free software (and
charge for this service if you wish);that you receive source code or canget it if you want it;
that you canchange the software and use pieces of it innewfree programs;and that you
are informed that you cando these things.
To protect your rights,we need to make restrictions that forbid distributors to deny you
these rights or to ask you to surrender these rights.These restrictions translate to certain
responsibilities for you if you distribute copies of the library or if you modify it.
For example,if you distribute copies of the library,whether gratis or for a fee,you must
give the recipients all the rights that we gave you.You must make sure that they,too,
receive or canget the source code.If you link other code with the library,you must
provide complete object files to the recipients,so that they canrelink themwith the
library after making changes to the library and recompiling it.And you must showthem
these terms so they knowtheir rights.We protect your rights with a two-step method:(1)
we copyright the library,and (2) we offer you this license,which gives you legal
permissionto copy,distribute and/or modify the library.
InstallationRequirements
GlassFishServer OpenSource Edition3.1InstallationGuide • July 201114
To protect each distributor,we want to make it very clear that there is no warranty for the
free library.Also,if the library is modified by someone else and passed on,the recipients
should knowthat what they have is not the original version,so that the original author's
reputationwill not be affected by problems that might be introduced by others.
Finally,software patents pose a constant threat to the existence of any free program.We
wish to make sure that a company cannot effectively restrict the users of a free programby
obtaining a restrictive license froma patent holder.Therefore,we insist that any patent
license obtained for a versionof the library must be consistent with the full freedomof use
specified inthis license.Most GNUsoftware,including some libraries,is covered by the
ordinary GNUGeneral Public License.This license,the GNULesser General Public
License,applies to certaindesignated libraries,and is quite different fromthe ordinary
General Public License.We use this license for certainlibraries inorder to permit linking
those libraries into non-free programs.
Whena programis linked with a library,whether statically or using a shared library,the
combinationof the two is legally speaking a combined work,a derivative of the original
library.The ordinary General Public License therefore permits such linking only if the
entire combinationfits its criteria of freedom.The Lesser General Public License permits
more lax criteria for linking other code with the library.
We call this license the"Lesser"General Public License because it does Less to protect the
user's freedomthanthe ordinary General Public License.It also provides other free
software developers Less of anadvantage over competing non-free programs.These
disadvantages are the reasonwe use the ordinary General Public License for many
libraries.However,the Lesser license provides advantages incertainspecial
circumstances.
For example,onrare occasions,there may be a special need to encourage the widest
possible use of a certainlibrary,so that it becomes a de-facto standard.To achieve this,
non-free programs must be allowed to use the library.Amore frequent case is that a free
library does the same job as widely used non-free libraries.Inthis case,there is little to
gainby limiting the free library to free software only,so we use the Lesser General Public
License.
Inother cases,permissionto use a particular library innon-free programs enables a
greater number of people to use a large body of free software.For example,permissionto
use the GNUCLibrary innon-free programs enables many more people to use the whole
GNUoperating system,as well as its variant,the GNU/Linux operating system.
Although the Lesser General Public License is Less protective of the users'freedom,it
does ensure that the user of a programthat is linked with the Library has the freedomand
the wherewithal to runthat programusing a modified versionof the Library.
The precise terms and conditions for copying,distributionand modificationfollow.Pay
close attentionto the difference betweena"work based onthe library"and a"work that
uses the library".The former contains code derived fromthe library,whereas the latter
must be combined with the library inorder to run.
InstallationRequirements
Chapter 1 • InstallingGlassFishServer 3.1 15
TERMS ANDCONDITIONS FORCOPYING,DISTRIBUTIONAND
MODIFICATION
0.This License Agreement applies to any software library or other programwhich
contains a notice placed by the copyright holder or other authorized party saying it may
be distributed under the terms of this Lesser General Public License (also called"this
License").Each licensee is addressed as"you".A"library"means a collectionof software
functions and/or data prepared so as to be conveniently linked with applicationprograms
(which use some of those functions and data) to formexecutables.The"Library",below,
refers to any such software library or work which has beendistributed under these terms.
A"work based onthe Library"means either the Library or any derivative work under
copyright law:that is to say,a work containing the Library or a portionof it,either
verbatimor with modifications and/or translated straightforwardly into another
language.(Hereinafter,translationis included without limitationinthe term
"modification".)"Source code"for a work means the preferred formof the work for
making modifications to it.For a library,complete source code means all the source code
for all modules it contains,plus any associated interface definitionfiles,plus the scripts
used to control compilationand installationof the library.Activities other thancopying,
distributionand modificationare not covered by this License;they are outside its scope.
The act of running a programusing the Library is not restricted,and output fromsuch a
programis covered only if its contents constitute a work based onthe Library
(independent of the use of the Library ina tool for writing it).Whether that is true
depends onwhat the Library does and what the programthat uses the Library does.
1.You may copy and distribute verbatimcopies of the Library's complete source code as
you receive it,inany medium,provided that you conspicuously and appropriately
publish oneach copy anappropriate copyright notice and disclaimer of warranty;keep
intact all the notices that refer to this License and to the absence of any warranty;and
distribute a copy of this License along with the Library.You may charge a fee for the
physical act of transferring a copy,and you may at your optionoffer warranty protection
inexchange for a fee.
2.You may modify your copy or copies of the Library or any portionof it,thus forming a
work based onthe Library,and copy and distribute such modifications or work under the
terms of Section1 above,provided that you also meet all of these conditions:
a) The modified work must itself be a software library.b) You must cause the files
modified to carry prominent notices stating that you changed the files and the date of any
change.c) You must cause the whole of the work to be licensed at no charge to all third
parties under the terms of this License.d) If a facility inthe modified Library refers to a
functionor a table of data to be supplied by anapplicationprogramthat uses the facility,
other thanas anargument passed whenthe facility is invoked,thenyou must make a
good faith effort to ensure that,inthe event anapplicationdoes not supply such function
or table,the facility still operates,and performs whatever part of its purpose remains
meaningful.(For example,a functionina library to compute square roots has a purpose
that is entirely well-defined independent of the application.Therefore,Subsection2d
InstallationRequirements
GlassFishServer OpenSource Edition3.1InstallationGuide • July 201116
requires that any application-supplied functionor table used by this functionmust be
optional:if the applicationdoes not supply it,the square root functionmust still compute
square roots.) These requirements apply to the modified work as a whole.If identifiable
sections of that work are not derived fromthe Library,and canbe reasonably considered
independent and separate works inthemselves,thenthis License,and its terms,do not
apply to those sections whenyou distribute themas separate works.But whenyou
distribute the same sections as part of a whole which is a work based onthe Library,the
distributionof the whole must be onthe terms of this License,whose permissions for
other licensees extend to the entire whole,and thus to each and every part regardless of
who wrote it.Thus,it is not the intent of this sectionto claimrights or contest your rights
to work writtenentirely by you;rather,the intent is to exercise the right to control the
distributionof derivative or collective works based onthe Library.Inaddition,mere
aggregationof another work not based onthe Library with the Library (or with a work
based onthe Library) ona volume of a storage or distributionmediumdoes not bring the
other work under the scope of this License.
3.You may opt to apply the terms of the ordinary GNUGeneral Public License instead of
this License to a givencopy of the Library.To do this,you must alter all the notices that
refer to this License,so that they refer to the ordinary GNUGeneral Public License,
version2,instead of to this License.(If a newer versionthanversion2 of the ordinary
GNUGeneral Public License has appeared,thenyou canspecify that versioninstead if
you wish.) Do not make any other change inthese notices.Once this change is made ina
givencopy,it is irreversible for that copy,so the ordinary GNUGeneral Public License
applies to all subsequent copies and derivative works made fromthat copy.This optionis
useful whenyou wish to copy part of the code of the Library into a programthat is not a
library.
4.You may copy and distribute the Library (or a portionor derivative of it,under Section
2) inobject code or executable formunder the terms of Sections 1 and 2 above provided
that you accompany it with the complete corresponding machine- readable source code,
which must be distributed under the terms of Sections 1 and 2 above ona medium
customarily used for software interchange.If distributionof object code is made by
offering access to copy froma designated place,thenoffering equivalent access to copy
the source code fromthe same place satisfies the requirement to distribute the source
code,eventhough third parties are not compelled to copy the source along with the object
code.
5.Aprogramthat contains no derivative of any portionof the Library,but is designed to
work with the Library by being compiled or linked with it,is called a"work that uses the
Library".Such a work,inisolation,is not a derivative work of the Library,and therefore
falls outside the scope of this License.However,linking a"work that uses the Library"
with the Library creates anexecutable that is a derivative of the Library (because it
contains portions of the Library),rather thana"work that uses the library".The
executable is therefore covered by this License.Section6 states terms for distributionof
such executables.Whena"work that uses the Library"uses material froma header file
that is part of the Library,the object code for the work may be a derivative work of the
InstallationRequirements
Chapter 1 • InstallingGlassFishServer 3.1 17
Library eventhough the source code is not.Whether this is true is especially significant if
the work canbe linked without the Library,or if the work is itself a library.The threshold
for this to be true is not precisely defined by law.If such anobject file uses only numerical
parameters,data structure layouts and accessors,and small macros and small inline
functions (tenlines or less inlength),thenthe use of the object file is unrestricted,
regardless of whether it is legally a derivative work.(Executables containing this object
code plus portions of the Library will still fall under Section6.) Otherwise,if the work is a
derivative of the Library,you may distribute the object code for the work under the terms
of Section6.Any executables containing that work also fall under Section6,whether or
not they are linked directly with the Library itself.
6.As anexceptionto the Sections above,you may also combine or link a"work that uses
the Library"with the Library to produce a work containing portions of the Library,and
distribute that work under terms of your choice,provided that the terms permit
modificationof the work for the customer's ownuse and reverse engineering for
debugging such modifications.You must give prominent notice with each copy of the
work that the Library is used init and that the Library and its use are covered by this
License.You must supply a copy of this License.If the work during executiondisplays
copyright notices,you must include the copyright notice for the Library among them,as
well as a reference directing the user to the copy of this License.Also,you must do one of
these things:
a) Accompany the work with the complete corresponding machine-readable source code
for the Library including whatever changes were used inthe work (which must be
distributed under Sections 1 and 2 above);and,if the work is anexecutable linked with
the Library,with the complete machine-readable"work that uses the Library",as object
code and/or source code,so that the user canmodify the Library and thenrelink to
produce a modified executable containing the modified Library.(It is understood that the
user who changes the contents of definitions files inthe Library will not necessarily be
able to recompile the applicationto use the modified definitions.) b) Use a suitable shared
library mechanismfor linking with the Library.Asuitable mechanismis one that (1) uses
at runtime a copy of the library already present onthe user's computer system,rather
thancopying library functions into the executable,and (2) will operate properly with a
modified versionof the library,if the user installs one,as long as the modified versionis
interface-compatible with the versionthat the work was made with.c) Accompany the
work with a writtenoffer,valid for at least three years,to give the same user the materials
specified inSubsection6a,above,for a charge no more thanthe cost of performing this
distribution.d) If distributionof the work is made by offering access to copy froma
designated place,offer equivalent access to copy the above specified materials fromthe
same place.e) Verify that the user has already received a copy of these materials or that
you have already sent this user a copy.For anexecutable,the required formof the"work
that uses the Library"must include any data and utility programs needed for reproducing
the executable fromit.However,as a special exception,the materials to be distributed
need not include anything that is normally distributed (ineither source or binary form)
with the major components (compiler,kernel,and so on) of the operating systemon
InstallationRequirements
GlassFishServer OpenSource Edition3.1InstallationGuide • July 201118
which the executable runs,unless that component itself accompanies the executable.It
may happenthat this requirement contradicts the license restrictions of other proprietary
libraries that do not normally accompany the operating system.Such a contradiction
means you cannot use both themand the Library together inanexecutable that you
distribute.
7.You may place library facilities that are a work based onthe Library side-by- side ina
single library together with other library facilities not covered by this License,and
distribute such a combined library,provided that the separate distributionof the work
based onthe Library and of the other library facilities is otherwise permitted,and
provided that you do these two things:
a) Accompany the combined library with a copy of the same work based onthe Library,
uncombined with any other library facilities.This must be distributed under the terms of
the Sections above.b) Give prominent notice with the combined library of the fact that
part of it is a work based onthe Library,and explaining where to find the accompanying
uncombined formof the same work.8.You may not copy,modify,sublicense,link with,
or distribute the Library except as expressly provided under this License.Any attempt
otherwise to copy,modify,sublicense,link with,or distribute the Library is void,and will
automatically terminate your rights under this License.However,parties who have
received copies,or rights,fromyou under this License will not have their licenses
terminated so long as such parties remaininfull compliance.
9.You are not required to accept this License,since you have not signed it.However,
nothing else grants you permissionto modify or distribute the Library or its derivative
works.These actions are prohibited by lawif you do not accept this License.Therefore,by
modifying or distributing the Library (or any work based onthe Library),you indicate
your acceptance of this License to do so,and all its terms and conditions for copying,
distributing or modifying the Library or works based onit.
10.Each time you redistribute the Library (or any work based onthe Library),the
recipient automatically receives a license fromthe original licensor to copy,distribute,
link with or modify the Library subject to these terms and conditions.You may not
impose any further restrictions onthe recipients'exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties with this License.
11.If,as a consequence of a court judgment or allegationof patent infringement or for
any other reason(not limited to patent issues),conditions are imposed onyou (whether
by court order,agreement or otherwise) that contradict the conditions of this License,
they do not excuse you fromthe conditions of this License.If you cannot distribute so as
to satisfy simultaneously your obligations under this License and any other pertinent
obligations,thenas a consequence you may not distribute the Library at all.For example,
if a patent license would not permit royalty-free redistributionof the Library by all those
who receive copies directly or indirectly through you,thenthe only way you could satisfy
both it and this License would be to refrainentirely fromdistributionof the Library.If
any portionof this sectionis held invalid or unenforceable under any particular
circumstance,the balance of the sectionis intended to apply,and the sectionas a whole is
InstallationRequirements
Chapter 1 • InstallingGlassFishServer 3.1 19
intended to apply inother circumstances.It is not the purpose of this sectionto induce
you to infringe any patents or other property right claims or to contest validity of any
such claims;this sectionhas the sole purpose of protecting the integrity of the free
software distributionsystemwhich is implemented by public license practices.Many
people have made generous contributions to the wide range of software distributed
through that systeminreliance onconsistent applicationof that system;it is up to the
author/donor to decide if he or she is willing to distribute software through any other
systemand a licensee cannot impose that choice.This sectionis intended to make
thoroughly clear what is believed to be a consequence of the rest of this License.
12.If the distributionand/or use of the Library is restricted incertaincountries either by
patents or by copyrighted interfaces,the original copyright holder who places the Library
under this License may add anexplicit geographical distributionlimitationexcluding
those countries,so that distributionis permitted only inor among countries not thus
excluded.Insuch case,this License incorporates the limitationas if writteninthe body of
this License.
13.The Free Software Foundationmay publish revised and/or newversions of the Lesser
General Public License fromtime to time.Such newversions will be similar inspirit to
the present version,but may differ indetail to address newproblems or concerns.Each
versionis givena distinguishing versionnumber.If the Library specifies a version
number of this License which applies to it and"any later version",you have the optionof
following the terms and conditions either of that versionor of any later versionpublished
by the Free Software Foundation.If the Library does not specify a license versionnumber,
you may choose any versionever published by the Free Software Foundation.
14.If you wish to incorporate parts of the Library into other free programs whose
distributionconditions are incompatible with these,write to the author to ask for
permission.For software which is copyrighted by the Free Software Foundation,write to
the Free Software Foundation;we sometimes make exceptions for this.Our decisionwill
be guided by the two goals of preserving the free status of all derivatives of our free
software and of promoting the sharing and reuse of software generally.
NOWARRANTY
15.BECAUSETHELIBRARYIS LICENSEDFREEOF CHARGE,THEREIS NO
WARRANTYFORTHELIBRARY,TOTHEEXTENTPERMITTEDBYAPPLICABLE
LAW.EXCEPTWHENOTHERWISESTATEDINWRITINGTHECOPYRIGHT
HOLDERS AND/OROTHERPARTIES PROVIDETHELIBRARY"AS IS"WITHOUT
WARRANTYOF ANYKIND,EITHEREXPRESSEDORIMPLIED,INCLUDING,BUT
NOTLIMITEDTO,THEIMPLIEDWARRANTIES OF MERCHANTABILITYAND
FITNESS FORAPARTICULARPURPOSE.THEENTIRERISKAS TOTHEQUALITY
ANDPERFORMANCEOF THELIBRARYIS WITHYOU.SHOULDTHELIBRARY
PROVEDEFECTIVE,YOUASSUMETHECOSTOF ALL NECESSARYSERVICING,
REPAIRORCORRECTION.
16.INNOEVENTUNLESS REQUIREDBYAPPLICABLELAWORAGREEDTOIN
WRITINGWILL ANYCOPYRIGHTHOLDER,ORANYOTHERPARTYWHOMAY
InstallationRequirements
GlassFishServer OpenSource Edition3.1InstallationGuide • July 201120
MODIFYAND/ORREDISTRIBUTETHELIBRARYAS PERMITTEDABOVE,BE
LIABLETOYOUFORDAMAGES,INCLUDINGANYGENERAL,SPECIAL,
INCIDENTAL ORCONSEQUENTIAL DAMAGES ARISINGOUTOF THEUSEOR
INABILITYTOUSETHELIBRARY(INCLUDINGBUTNOTLIMITEDTOLOSS OF
DATAORDATABEINGRENDEREDINACCURATEORLOSSES SUSTAINEDBY
YOUORTHIRDPARTIES ORAFAILUREOF THELIBRARYTOOPERATEWITH
ANYOTHERSOFTWARE),EVENIF SUCHHOLDEROROTHERPARTYHAS BEEN
ADVISEDOF THEPOSSIBILITYOF SUCHDAMAGES.ENDOF TERMS AND
CONDITIONS Howto Apply These Terms to Your NewLibraries If you develop a new
library,and you want it to be of the greatest possible use to the public,we recommend
making it free software that everyone canredistribute and change.You cando so by
permitting redistributionunder these terms (or,alternatively,under the terms of the
ordinary General Public License).To apply these terms,attach the following notices to
the library.It is safest to attach themto the start of each source file to most effectively
convey the exclusionof warranty;and each file should have at least the"copyright"line
and a pointer to where the full notice is found.one line to give the library's name and an
idea of what it does.Copyright (C) year name of author This library is free software;you
canredistribute it and/or modify it under the terms of the GNULesser General Public
License as published by the Free Software Foundation;either version2.1 of the License,or
(at your option) any later version.This library is distributed inthe hope that it will be
useful,but WITHOUTANYWARRANTY;without eventhe implied warranty of
MERCHANTABILITYor FITNESS FORAPARTICULARPURPOSE.See the GNU
Lesser General Public License for more details.You should have received a copy of the
GNULesser General Public License along with this library;if not,write to the Free
Software Foundation,Inc.,51 FranklinStreet,Fifth Floor,Boston,MA02110-1301 USA
Also add informationonhowto contact you by electronic and paper mail.You should
also get your employer (if you work as a programmer) or your school,if any,to signa
"copyright disclaimer"for the library,if necessary.Here is a sample;alter the names:
Yoyodyne,Inc.,hereby disclaims all copyright interest inthe library ‘Frob'(a library for
tweaking knobs) writtenby James RandomHacker.signature of Ty Coon,1 April 1990 Ty
Coon,President of Vice That's all there is to it!
InstallationFiles for GlassFishServer 3.1
The following topics are addressed here:

“GlassFish Server Download Locations” onpage 22

“GlassFish Server InstallationMethods” onpage 22

“Choosing anInstallationMethod” onpage 22

“GlassFish Server ZIPFiles” onpage 25

“GlassFish Server Self-Extracting Bundles” onpage 26
InstallationFiles for GlassFishServer 3.1
Chapter 1 • InstallingGlassFishServer 3.1 21
GlassFishServer DownloadLocations
Installationfiles for GlassFish Server OpenSource Edition3.1 are available by download from
the following locations:

GlassFish Server Downloads (http://www.oracle.com/technetwork/middleware/
glassfish/downloads/index.html)
page
GlassFish Server OpenSource Edition3.1 is also part of the Java EE6 SDKdistributions.The
SDKdistributions are available fromthe
Java EEdownloads page
and are not described inthis
document.
GlassFishServer InstallationMethods
Table 1–1
lists the various GlassFish Server OpenSource Editioninstallationmethods.The
table also provides links to installationinstructions for each method.
Note –
Before performing any GlassFishServer installation,ensure that your environment
adheres to the JDKguidelines in“Paths and Environment Settings for the JDKSoftware” in
GlassFish Server Open Source Edition 3.1-3.1.1 Release Notes.
TABLE 1–1
GlassFishServer 3.1 InstallationMethods
InstallationMethod InstallationInstructions
Multi-platformZIPfile
“Installing GlassFish Server Froma ZIPFile” onpage 26
.
Solaris,Linux,Mac OS,UNIX,or
Windows self-extracting bundle in
graphical mode
“Installing GlassFish Server Froma Self-Extracting Bundle” on
page 27
.
Solaris,Linux,Mac OS,UNIX,or
Windows self-extracting bundle insilent
mode
“Performing a Silent Mode Installation” onpage 37
Each of the installationmethods listed in
Table 1–1
also let you choose betweeninstalling the
Full Platformor the Web Profile.These two distributions are explained inthe next section.
ChoosinganInstallationMethod
There are two general sets of questions you should consider whendeciding which GlassFish
Server 3.1 installationmethod to use.

“ZIPPackage or Self-Extracting Bundle?” onpage 23
InstallationFiles for GlassFishServer 3.1
GlassFishServer OpenSource Edition3.1InstallationGuide • July 201122

“Full Platformor Web Profile Distribution?” onpage 23
ZIPPackageor Self-ExtractingBundle?
The relative features and strengths of the GlassFish Server ZIPpackages and self-extracting
bundles are listed below.

ZIPPackage

Is simpler to install,but provides no configurationoptions during the installation

Any additional configurations must be performed manually,after installation

Includes Update Tool and pkg utility installer stubs,which canbe used to install those
utilities after GlassFish Server installation

If uninstallationis desired,product must be uninstalled manually

Product downloads are roughly 25%-30%larger thanthe analogous self-extracting
bundles

Self-Extracting Bundle

Provides a GUI-based installationwizard with many configurationoptions

The installationwizard canbe used againafter the initial installationto perform
additional configurationtasks

Canbe used to performSilent Mode installation,which is useful for performing
consistent script-based installations onmultiple server machines

Provides the optionto install the full Update Tool and pkg utility at installationtime

If uninstallationis required,a GUI-based uninstaller is provided
Full Platformor WebProfileDistribution?
Each of the installationmethods listed in
Table 1–1
also let you choose to install either the
GlassFish Server Full Platformor Web Profile distribution.
Table 1–2
lists the features available
ineach of these two distributions.Note that some of these features are value-adds,and are not
required by the Java 6 EEspecification.
TABLE 1–2
GlassFishServer Full Profile andWebProfile Features
Feature Full Platform WebProfile
Java Platform,Enterprise Edition6 X X
EJB3.1 Lite (Support for Local Container only) X X
JTS/JTA1.1 ** X X
OSGi-based microkernel X X
InstallationFiles for GlassFishServer 3.1
Chapter 1 • InstallingGlassFishServer 3.1 23
TABLE 1–2
GlassFishServer Full Profile andWebProfile Features (Continued)
Feature Full Platform WebProfile
Java Web Technologies (Servlet 3.0,JSP2.2,JSF 2.0,JSTL 1.2,EL
2.2)
X X
Grizzly/Comet X X
JPA2.0,(EclipseLink),JDBCConnectionPooling X X
JDBC4.0 X X
JavaDB10.5.3 X X
Web AdministrationConsole and CLI X X
Rapid Redeployment (Maintainsessionstate onapplication
redeploy)
X X
OMGCORBAAPIs 3.0 X X
Debugging Support for Other Languages 1.0 X X
CommonAnnotations for Java 1.1 X X
Dependency Injectionfor Java 1.0 X X
Managed Beans 1.0 X X
Interceptors 1.1 X X
Contexts and Dependency Injectionfor Java 1.0 (CDI,ex-Web
Beans)
X X
BeanValidation1.0 X X
JAX-RS 1.1 (Jersey) X X
EJB3.1 Full API (Support for Remote Container) X -
Java EEConnector Architecture 1.6 X -
JAX-WS 2.2 X -
JAXB2.2 X -
Implementing Java Web Services 1.3 X -
Web Services Metadata for the Java Platform2.1 X -
JMS 1.1 X -
JavaMail 1.4 X -
JACC1.4 X -
InstallationFiles for GlassFishServer 3.1
GlassFishServer OpenSource Edition3.1InstallationGuide • July 201124
TABLE 1–2
GlassFishServer Full Profile andWebProfile Features (Continued)
Feature Full Platform WebProfile
Java AuthenticationService Provider Interface for Containers
1.1
X -
Java EEApplicationDeployment 1.2 X -
J2EEManagement 1.1 X -
JAX-RPC1.1 X -
JAXR1.0 X -
CORBA3.0.0 X *
Metro X -
* The Full Java EEPlatformcontains the complete CORBApackage.The OMGCORBAv3.0
APIs are available inthe Java EEWeb Profile.
** Transactionpropagationnot supported.
Note –
Regardless of whether youchoose the Full Platformor Web Profile distribution,youcan
add or removed packages after installationby using the Update Tool or pkg utility.See Chapter
10,“Extending and Updating GlassFish Server,” inGlassFish Server Open Source Edition 3.1
Administration Guide for more information.
GlassFishServer ZIPFiles
The GlassFish Server OpenSource Edition3.1 multi-platformZIPfiles are compatible with
Solaris,Linux,Mac OS,UNIX,and Windows operating systems.See
“GlassFish Server
Download Locations” onpage 22
for a list of download locations.
Table 1–3
lists the available ZIPfile downloads.
Note –
Inall cases,the *-ml.zip bundles inthe table are multilingual versions of the product.
TABLE 1–3
GlassFishServer Downloadable ZIPFiles
ZIPFile Description
glassfish-3.1.zip
glassfish-3.1-ml.zip
Full Platformdistributionof GlassFish Server OpenSource Edition
glassfish-3.1-web.zip
glassfish-3.1-web-ml.zip
Web Profile distributionGlassFish Server OpenSource Edition
InstallationFiles for GlassFishServer 3.1
Chapter 1 • InstallingGlassFishServer 3.1 25
GlassFishServer Self-ExtractingBundles
The GlassFish Server OpenSource Edition3.1 self-extracting bundles are platform-specific,and
are available for Solaris,Linux,Mac OS,UNIX,and Windows operating systems.See
“GlassFish
Server Download Locations” onpage 22
for a list of download locations.
Table 1–4
lists the available self-extracting bundles.
Note –
Inall cases,the *-ml.* bundles inthe table are multilingual versions of the product.
TABLE 1–4
GlassFishServer Self-extracting Bundles
Self—ExtractingBundle Description
glassfish-3.1-unix.sh
glassfish-3.1-windows.exe
glassfish-3.1-unix-ml.sh
glassfish-3.1-windows-ml.exe
Full Platformdistributionof GlassFish Server OpenSource Editionfor
Solaris,Linux,and Mac OS Xsystems (*-unix.sh) and Windows
(*-windows.exe)
glassfish-3.1-web-unix.sh
glassfish-3.1-web-windows.exe
glassfish-3.1-web-unix-ml.sh
glassfish-3.1-web-windows-ml.exe
Web Profile distributionGlassFish Server OpenSource Editionfor
Solaris,Linux,and Mac OS Xsystems (*-unix.sh) and Windows
(*-windows.exe)
InstallingGlassFishServer FromaZIPFile
This sectiondescribes howto install GlassFish Server OpenSource Edition3.1 using the
multi-platformZIPfile.GlassFish Server is installed by unzipping the file inthe installation
directory of your choice.
Note –
It is not possible to specify any GlassFishServer configurationoptions during a ZIPfile
installation.Any configurationchanges,such as creating domains,clusters,and server
instances,must be made manually after installation.If you prefer to make such changes during
the GlassFish Server installationprocess,or if you prefer to use the GUI-based installation
wizard,followthe instructions in
“Installing GlassFish Server Froma Self-Extracting Bundle”
onpage 27
.

ToInstall GlassFishServer UsingtheZIPFile
Ensure that your systemmeets the requirements listed in“Hardware and Software
Requirements” in GlassFish Server Open Source Edition 3.1-3.1.1 Release Notes.
Also see “KnownIssues” in GlassFish Server Open Source Edition 3.1-3.1.1 Release Notes for
knownissues related to installation.
BeforeYouBegin
InstallingGlassFishServer Froma ZIPFile
GlassFishServer OpenSource Edition3.1InstallationGuide • July 201126
DownloadthedesiredGlassFishServer 3.1ZIPfile.
See
“GlassFish Server Download Locations” onpage 22
for a list of download locations.See
Table 1–3
for a list of available ZIPfiles.
ChangetothedirectorywhereyoudownloadedtheZIPfile.
Unzipthefile.

Solaris,Linux,andMac OS Xsystems:
unzip zip-file-name
zip-file-name is the name of the file that you downloaded.
For example:
glassfish-3.1.zip

Windows systems:
Unzip using your favorite file compressionutility.
GlassFish Server 3.1 is extracted into a newglassfish3 directory under your current directory.
This glassfish3 directory is referred to throughout the GlassFish Server documentationset as
as-install-parent.
(Optional) Start GlassFishServer usingthe instructions inthe GlassFishServer OpenSource
Edition 3.1 Quick Start Guide.
The guide explains howto performbasic tasks such as starting the server,accessing the
AdministrationConsole,and deploying a sample application.
InstallingGlassFishServer FromaSelf-ExtractingBundle
This sectiondescribes howto install GlassFish Server OpenSource Edition3.1 software using
one of the self-extracting installationbundles.Running any of the self-extracting bundles
automatically launches the GUI-based GlassFish Server installationwizard.
The following topics are addressed here:

“To Install GlassFish Server Using the Self-Extracting File” onpage 28

“To Performa CustomInstallation” onpage 31

“CustomConfigurationParameters” onpage 34
Note –
Console installationis not supportedinGlassFishServer OpenSource Edition3.1.Silent
mode installationis available,however.For more information,see
“Performing a Silent Mode
Installation” onpage 37
.
1
2
3
4
InstallingGlassFishServer Froma Self-ExtractingBundle
Chapter 1 • InstallingGlassFishServer 3.1 27

ToInstall GlassFishServer UsingtheSelf-Extracting
File

Whenlaunching the self-extracting installer fromthe command-line,it possible to specify
several command-line options that may be useful to you.See
“InstallationCommand-Line
Options” onpage 44
for more information.

Ensure that your systemmeets the requirements listed in“Hardware and Software
Requirements” in GlassFish Server Open Source Edition 3.1-3.1.1 Release Notes.

See “KnownIssues” in GlassFish Server Open Source Edition 3.1-3.1.1 Release Notes for
knownissues related to installation.
DownloadthedesiredGlassFishServer 3.1bundle.
See
“GlassFish Server Download Locations” onpage 22
for a list of download locations.See
Table 1–4
for a list of available self-extracting bundles.
Changetothedirectorywhereyoudownloadedtheself-extractingfile.
Start theinstaller.

Solaris,Linux,andMac OSXsystems:
a.If necessary,grant executepermissions totheself–extractingfile:
chmod +x./self-extracting-file-name
self-extracting-file-name is the name of the self-extracting file that you downloaded.
b.At thecommandprompt,type:
sh./self-extracting-file-name
For example,start the installer by typing the following:
glassfish-3.1-unix.sh
See
“InstallationCommand-Line Options” onpage 44
for a list of command-line
options you canspecify here,if desired.

Windows systems:
a.Double-clicktheexecutable.exeinstallationfile.
For example,double-click:
glassfish-3.1-windows.exe
OnWindows you canalso start the installer by typing the file name at the command
prompt.
BeforeYouBegin
1
2
3
InstallingGlassFishServer Froma Self-ExtractingBundle
GlassFishServer OpenSource Edition3.1InstallationGuide • July 201128
Note–

Additional setup options are available.See
“InstallationCommand-Line Options” on
page 44
.

If you are installing ona 64–bit Windows system,runthe installer with the -j option
pointing to a 64–bit JDK.

Depending onyour user privileges and the versionof Windows you are running,it may be
necessary to runthe installer as Administrator.Inparticular,if you will be configuring the
domainas a Service as part of a CustomInstallation (see next step) or after the installation,
thenyou should runthe installer as Administrator.
After starting the installer,the Introductionpage is displayed.Use the Next buttonto move
through the installationprocess.
ChoosetheInstallationType

Typical Installation
Choose this optionfor applicationdevelopment purposes or non-productionuse only.This
optioninstalls the GlassFish Server binaries and creates a DAS.

CustomInstallation
Choose the optionif you are deploying GlassFish Server ina productionenvironment.This
optionprovides several installationchoices,which are described indetail later inthis guide,
in
“To Performa CustomInstallation” onpage 31
.
The remainder of this procedure describes the steps inthe Typical Installationpath.If you are
performing a CustomInstallation,skip the remainder of this procedure and jump instead to
“To Performa CustomInstallation” onpage 31
.
Specifywheretoinstall GlassFishServer.
The default installationdirectories are as follows:

Solaris,Linux,andMac OSXsystems
user-home-directory/glassfish3

Windows systems
SystemDrive\glassfish3
Make sure the directory you specify is empty before installing the product.
The default installationdirectory is referred to as as-install-parent throughout the GlassFish
Server documentation.
4
5
InstallingGlassFishServer Froma Self-ExtractingBundle
Chapter 1 • InstallingGlassFishServer 3.1 29
Specifywhether toinstall andenableUpdateTool.
Update Tool is anadministrative tool that enables you to install updates and add-on
components to anexisting GlassFish Server 3.1 installation.Update Tool canbe installed
during GlassFish Server installationor at a later time.For more informationabout Update Tool,
see “Update Tool” in GlassFish Server Open Source Edition 3.1 Administration Guide.

If you are not installing Update Tool,deselect the Install Update Tool check box.

If you are installing Update Tool and your systemaccesses the Internet through a proxy,
specify the proxy host and proxy port.

If you are installing Update Tool and do not require the automatic notifications of available
updates after installation,deselect the Enable Update Tool check box.
Note –
Update Tool differs fromUpgrade Tool,whichis usedto migrate the configurationand
deployed applications fromanearlier versionof GlassFish Server to the current version.For
more informationabout Upgrade Tool,see the GlassFish Server Open Source Edition 3.1
Upgrade Guide.
ReviewtheReadyToInstall selections andclickInstall toproceedwiththeinstallation.
Aprogress bar is displayed as the core GlassFish Server components are installed and the
default domainis automatically created and started.
The installer creates a default domainnamed domain1.The results of this process will be briefly
visible inthe ConfigResults screen.
Tip –
The configurationresults panel presents the recently executedcommandinthe center
sectionand this is a selectable text.The text canbe copied onto a script for future automated
runs of such commands.
Note –
If youchoose to cancel the installationat this point,no GlassFishServer files will be
installed,but the directory you specified for as-install-parent will remain.This directory canbe
deleted manually.
ReviewthesummarypageandclickExit toexit theinstaller.
Installationinformationis captured inlog files.The names of the files are
timestamp-install.log and timestamp-install-summary.html.OnSolaris,Linux,and Mac
OS Xsystems,these files are generated by default inthe/tmp directory.OnWindows systems,
these files are generated inthe %TEMP%directory.
(Optional) Register your GlassFishServer product.
Followthe instructions onthe registrationscreento complete the registrationprocess.
6
7
8
9
InstallingGlassFishServer Froma Self-ExtractingBundle
GlassFishServer OpenSource Edition3.1InstallationGuide • July 201130
Familiarize yourself with the instructions inthe GlassFish Server Open Source Edition 3.1 Quick
Start Guide.The guide explains howto performbasic tasks such as starting the server,accessing
the AdministrationConsole,and deploying a sample application.

ToPerformaCustomInstallation
This procedure builds uponthe instructions provided for the Typical Installationpath in
“To
Install GlassFish Server Using the Self-Extracting File” onpage 28
.
Completethesteps in
“ToInstall GlassFishServer UsingtheSelf-ExtractingFile”onpage28
.
Choosethekindof CustomInstallationyouwant toperform.

Install andConfigure
Install the GlassFish Server binaries,and thenconfigure a DAS and one or more standalone
server instances,clusters,or clustered instances.

Install Only
Install only the GlassFish Server binaries,without configuring a DAS or any server instances
or clusters.You canrerunthe GlassFish Server installationwizard at a later time and choose
the Configure anExisting Installationoptionto configure the items.

ConfigureanExistingInstallation
Configure a DAS,standalone server instances,clusters,or clustered instances for anexisting
GlassFish Server 3.1 installation.Note that this optionis not for upgrading fromanolder
versionof GlassFish Server.For instructions onupgrading froma versionof GlassFish
Server prior to 3.1,see the GlassFish Server Open Source Edition 3.1 Upgrade Guide.
The remainder of this procedure explains the Install and Configure option.Most of these steps
also apply to the other options.
Specifywheretoinstall GlassFishServer.
The default installationdirectories are as follows:

Solaris,Linux,andMac OSXsystems
user-home-directory/glassfish3

Windows systems
SystemDrive\glassfish3
Make sure the directory you specify is empty before installing the product.
The default installationdirectory is referred to as as-install-parent throughout the GlassFish
Server documentation.
SeeAlso
1
2
3
InstallingGlassFishServer Froma Self-ExtractingBundle
Chapter 1 • InstallingGlassFishServer 3.1 31
SpecifythepathtotheJDKtobeusedwiththeinstallation.
Use a JDKinstallationdetected by the installer or specify the path for a different JDK.
JDK6 is required.See
“InstallationRequirements” onpage 13
for more information.
Note –
This JDKpage is not presented for Mac OS Xinstallations.The installationuses the value
inthe JAVA_HOME environment variable.
Specifywhether toinstall UpdateTool.
Update Tool is anadministrative tool that enables you to install updates and add-on
components to anexisting GlassFish Server 3.1 installation.Update Tool canbe installed
during GlassFish Server installationor at a later time.For more informationabout Update Tool,
see “Update Tool” in GlassFish Server Open Source Edition 3.1 Administration Guide.

If you are not installing Update Tool,deselect the Install Update Tool check box.

If you are installing Update Tool and your systemaccesses the Internet through a proxy,
specify the proxy host and proxy port.

If you are installing Update Tool and do not require the automatic notifications of available
updates after installation,deselect the Enable Update Tool check box.
Note –
Update Tool differs fromUpgrade Tool,whichis usedto migrate the configurationand
deployed applications fromanearlier versionof GlassFish Server to the current version.For
more informationabout Upgrade Tool,see the GlassFish Server Open Source Edition 3.1
Upgrade Guide.
ReviewtheReadyToInstall selections andclickInstall toproceedwiththeinstallation.
Aprogress bar is displayed as the core GlassFish Server components are installed and the
default domainis automatically created and started.
Note –
If youchoose to cancel the installationat this point,no GlassFishServer files will be
installed,but the directory you specified for as-install-parent will remain.This directory canbe
deleted manually.
Whenthe core installationhas completed,the installer displays the Configurationpage.
ConfigureGlassFishServer components.
The general procedure for configuring server components involves the following substeps:
a.Chooseacomponent configurationoption:
4
5
6
7
InstallingGlassFishServer Froma Self-ExtractingBundle
GlassFishServer OpenSource Edition3.1InstallationGuide • July 201132
Create a server domain
Create a DomainAdministrationServer (DAS).At least one DAS must be created and
running before you canconfigure any other components.The parameters inthe
Configurationscreenfor this optionare described in
“Parameters for the Create a server
domainOption” onpage 34
.
Create a standalone server instance
Create a standalone GlassFish Server instance.The parameters inthe Configuration
screenfor this optionare described in
“Parameters for the Create a standalone server
instance Option” onpage 35
.
Create a clusteredserver instance
Create a newcluster or a clustered server instance ina newor existing a cluster.The
parameters inthe Configurationscreenfor this optionare described in
“Parameters for
the Create a clustered server instance Option” onpage 36
.
Skipconfiguration
Skip any additional component configurationand proceed immediately to the final steps
of the installationand configurationwizard.
Whenconfiguring a newor previously unconfigured GlassFish Server installationyou must
choose the first option,Create a server domain,before proceeding with any of the other
options.Once at least one server domainhas beencreated,you canchoose any of the other
options inany order you wish,including creating additional domains.
b.Configuretheselectedcomponent.
Each configurationoptiondisplays its ownconfigurationscreen.The specific options in
each configurationscreenare described after this procedure,in
“CustomConfiguration
Parameters” onpage 34
.
c.Choosehowyouwant toproceed.
After configuring any one of the available options,a ConfigurationResults screenis
displayed.Inadditionto displaying the configurationresults,three buttons are displayed:
Cancel
Cancel the configurationand exit the installationwizard.Note that the core GlassFish
Server components will already be installed at this point,as well as any configurations
that may have beenconfigured during this step or during another installation.To remove
the core GlassFish Server components and any configurations,followthe instructions in
Chapter 2,“Uninstalling GlassFish Server 3.1”
Configure again
Returnto the Configurationpage so you canconfigure another item.
Next
Complete the configurationoptionand continue to the final steps of the installationand
configurationwizard.Note that this label becomes"Exit"if this is a CustomInstallation
and the “Configure Existing Installation” optionis selected.
InstallingGlassFishServer Froma Self-ExtractingBundle
Chapter 1 • InstallingGlassFishServer 3.1 33
Tip –
The configurationresults panel presents the recently executedcommandinthe
center section.This is selectable text,and it canbe copied to a script for future automated
runs of such commands.
Whenyou have configured all the components you want and thenclicked the Next button,the
final configurationoptionis performed and a Summary screenis displayed.
ClickExit toexit theinstallationandconfigurationwizard.
Aweb browser is displayed so you canregister your GlassFish Server product.
(Optional) Register your GlassFishServer product.
Followthe instructions onthe registrationscreento complete the registrationprocess.
If you are done with the installationat this point,it is recommended that you familiarize
yourself with the instructions inthe GlassFish Server Open Source Edition 3.1 Quick Start Guide.
The guide explains howto performbasic tasks such as starting the server,accessing the
AdministrationConsole,and deploying a sample application.
CustomConfigurationParameters
This sectionlists the configurationparameters inthe screens displayed for the options inthe
Configure GlassFish Server components.
step in
“To Performa CustomInstallation” on
page 31
.

“Parameters for the Create a server domainOption” onpage 34

“Parameters for the Create a standalone server instance Option” onpage 35

“Parameters for the Create a clustered server instance Option” onpage 36
Parameters for theCreateaserver domainOption
The following are the parameters displayed inthe Configurationscreenwhenyou choose the
Create a server domainoptionin
Configure GlassFish Server components.
step in
“To Perform
a CustomInstallation” onpage 31
.This optionenables you to create a DomainAdministration
Server (DAS)
DomainName
The unique domainname to use for the DAS.The default name is domain1.
AdminPort
The port onwhich the GlassFish Server AdminConsole will listen.The default port is 4848.
HTTPPort
The port onwhich the non-secure HTTPserver will listen.The default port is 8080.Note
that the port used for the secure HTTPlistener is 8181.
8
9
SeeAlso
InstallingGlassFishServer Froma Self-ExtractingBundle
GlassFishServer OpenSource Edition3.1InstallationGuide • July 201134
Username
The user name for administrative access to the GlassFish Server AdminConsole.
Password
The password for administrative access to the GlassFish Server AdminConsole.You can
leave this parameter empty to enable unauthenticated logins to the AdminConsole,but
make sure that the Username field has"admin"as the input value.Specifying a password is
highly recommended if you are installing GlassFish Server ina productionenvironment.
Reenter Password
Reenter the password to verify your typing.
Create Operating SystemService for the domain
Specify whether anoperating systemservice will be created for the DAS.The service will be
started whenthe operating systemis booted.
If a service is not created here,the DAS canbe started manually using the asadmin
start-domain subcommand.
Note –
The Create Operating SystemService optionis not available onMac OS Xsystems.
Also note that onUnix or Linux systems,you must runthe installer as superuser or root if
you want to create a systemservice for the domain.
Service Name
Specify the name for the DAS operating systemservice.The default name is
domain1Service.This parameter is only required if the Create Operating Systemservice
parameter is enabled.
Start domainafter creation
Start the domainas soonas it is created.This optionis enabled by default.Note that is
necessary for the DAS to be running before you canconfigure any server instances or
clusters.If you choose to not start the domainat this time,you canstart it manually later
using the asadmin start-domain subcommand.
Note –
Ensure that this optionis enabledif youplanonperforming more configurations
during this installationprocedure.The DAS must be running inorder to create any server
instances or clusters.
Parameters for theCreateastandaloneserver instanceOption
The following are the parameters displayed inthe Configurationscreenwhenyou choose the
Create a standalone server instance optionin
Configure GlassFish Server components.
step in
“To Performa CustomInstallation” onpage 31
.This optionenables you to create a standalone
GlassFish Server instance.
InstallingGlassFishServer Froma Self-ExtractingBundle
Chapter 1 • InstallingGlassFishServer 3.1 35
Note –
The DAS for the domaininwhichthe standalone server instance will be created must be
running with the specified name and at the specified port before configuring a standalone server
instance.See the
“Parameters for the Create a server domainOption” onpage 34
for
instructions.
Instance Name
The unique name to use for the standalone GlassFish Server instance.If the name is already
inuse,anerror will be generated whenthe configurationis performed.The default name is
instance1.
Host Name
The name of the physical host onwhich the DAS is running.The default name is localhost.
AdministrationPort
The administrationport onwhich the DAS is running.The default port is 4848.
Parameters for theCreateaclusteredserver instanceOption
The following are the parameters displayed inthe Configurationscreenwhenyou choose the
Create a clustered server instance optionin
Configure GlassFish Server components.
step in
“To Performa CustomInstallation” onpage 31
.This optionenables you to create a newcluster
or a clustered server instance ina newor existing a cluster.
Note –
The DAS for the domaininwhichthe standalone server instance will be created must be
running with the specified name and at the specified port before configuring a cluster or
clustered server instance.See the
“Parameters for the Create a server domainOption” on
page 34
for instructions.
Instance Name
The unique name to use for the clustered GlassFish Server instance.If the name is already in
use,anerror will be generated whenthe configurationis performed.The default name is
instance1.
Host Name
The name of the physical host onwhich the DAS is running.The default name is localhost.
AdministrationPort
The administrationport onwhich the DAS is running.The default port is 4848.
Create Cluster
Specify whether a newcluster will be created at this time.The default is to leave this option
disabled.If left disabled,the cluster specified inthe Cluster Name field,below,must already
exist.
InstallingGlassFishServer Froma Self-ExtractingBundle
GlassFishServer OpenSource Edition3.1InstallationGuide • July 201136

Ensure that this optionis enabledif the cluster inwhich you want to create the clustered
server instance does not yet exist.

Ensure that this optionis disabledif the cluster inwhich you want to create the clustered
server existence already exists.
Cluster Name
The unique name to use for the cluster.If the name is already inuse,anerror will be
generated whenthe configurationis performed.The default name is c1.
DomainName
The name of the DAS inwhich the cluster will run.The default name is domain1.
PerformingaSilent ModeInstallation
This sectiondescribes howto install GlassFish Server OpenSource Edition3.1 using silent mode
installation.Silent mode is a non-interactive installationbased onuser-defined parameters
captured inananswer file.The answer file canbe used later to install GlassFish Server onone or
more systems.
Note –
It is only possible to performa silent installationusing the Typical Installationpath
described in
“To Install GlassFish Server Using the Self-Extracting File” onpage 28
.It is not
possible to performa silent installationusing the more complex CustomInstallationpath
described in
“To Performa CustomInstallation” onpage 31
.
The following topics are addressed here:

“Creating the InstallationAnswer File” onpage 37

“Reviewing the InstallationAnswer File” onpage 40

“Installing inSilent Mode” onpage 43
CreatingtheInstallationAnswer File
The answer file forms the template for silent installation.The file is created whenyou use the
dry-run (-n) optionto start aninteractive installation.Indry-runmode,actual installationdoes
not take place.
During the interactive installationyou canaccept the default values presented or you can
change them.Your input is collected and stored inthe answer file,which is thenused to install
GlassFish Server.You canuse the answer file as it is or you canmodify the file before using it.

ToCreatetheInstallationAnswer File
The installationwizard is used to create the answer file.Actual installationdoes not take place.
Performinga Silent Mode Installation
Chapter 1 • InstallingGlassFishServer 3.1 37

Remember that it is only possible to performa silent installationusing the Typical
Installationpath described in
“To Install GlassFish Server Using the Self-Extracting File” on
page 28
.It is not possible to performa silent installationusing the more complex Custom
Installationpath described in
“To Performa CustomInstallation” onpage 31
.

Whenlaunching the self-extracting installer fromthe command-line,it possible to specify
several command line options that may be useful to you.See
“InstallationCommand-Line
Options” onpage 44
for more information.

Ensure that your systemmeets the requirements listed in“Hardware and Software
Requirements” in GlassFish Server Open Source Edition 3.1-3.1.1 Release Notes.

See “KnownIssues” in GlassFish Server Open Source Edition 3.1-3.1.1 Release Notes for
knownissues related to installation.
DownloadthedesiredGlassFishServer 3.1bundle.
See
“GlassFish Server Download Locations” onpage 22
for a list of download locations.See
Table 1–4
for a list of available self-extracting bundles.
Changetothedirectorywhereyoudownloadedtheself-extractingfile.
Start theinstaller indry-runmode.

Solaris,Linux,andMac OSXsystems:
a.If necessary,grant executepermissions totheself–extractingfile:
chmod +x./self-extracting-file-name
self-extracting-file-name is the name of the self-extracting file that you downloaded.
b.At thecommandprompt,type:
self-extracting-file-name -n answer-file
answer-file is the name of the answer file you want to generate.If you do not include a
path to the answer file,the file is created under the directory fromwhich the installation
programis run.
For example,start the installer indry-runmode by typing the following:
glassfish-3.1-unix.sh -n 31-answer
See
“InstallationCommand-Line Options” onpage 44
for a list of command-line
options you canspecify here,if desired.

Windows systems:
a.OpenaWindows CommandPrompt shell withAdministrativeprivileges.
BeforeYouBegin
1
2
3
Performinga Silent Mode Installation
GlassFishServer OpenSource Edition3.1InstallationGuide • July 201138
b.At thecommandprompt,type:
self-extracting-file-name -n answer-file
answer-file is the name of the answer file you want to generate.If you do not include a
path to the answer file,the file is created under the directory fromwhich the installation
programis run.
For example,start the installer indry-runmode by typing the following:
glassfish-3.1-windows.exe -n 31-answer
See
“InstallationCommand-Line Options” onpage 44
for a list of command-line
options you canspecify here,if desired.
Note–

Additional setup options are available.See
“InstallationCommand-Line Options” on
page 44
.

If you are installing ona 64–bit Windows system,runthe installer with the -j option
pointing to a 64–bit JDK.

Depending onyour user privileges and the versionof Windows you are running,it may be
necessary to runthe installer as Administrator.Inparticular,if you will be configuring the
domainas a Service as part of a CustomInstallation (see next step) or after the installation,
thenyou should runthe installer as Administrator.
After starting the installer,the Introductionpage is displayed.Use the Next buttonto move
through the installationprocess.
ChooseTypical InstallationintheInstallationTypescreen.
It is not possible to use the CustomInstallationpath whengenerating ananswer file for
silent-mode installation.
Specifywheretoinstall GlassFishServer.
The default installationdirectories are as follows:

Solaris,Linux,andMac OSXsystems
user-home-directory/glassfish3

Windows systems
SystemDrive\glassfish3
Make sure the directory you specify is empty before installing the product.
The default installationdirectory is referred to as as-install-parent throughout the GlassFish
Server documentation.
4
5
Performinga Silent Mode Installation
Chapter 1 • InstallingGlassFishServer 3.1 39
Specifywhether toinstall andenableUpdateTool.
Update Tool is anadministrative tool that enables you to install updates and add-on
components to anexisting GlassFish Server 3.1 installation.Update Tool canbe installed
during GlassFish Server installationor at a later time.For more informationabout Update Tool,
see “Update Tool” in GlassFish Server Open Source Edition 3.1 Administration Guide.

If you are not installing Update Tool,deselect the Install Update Tool check box.

If you are installing Update Tool and your systemaccesses the Internet through a proxy,
specify the proxy host and proxy port.

If you are installing Update Tool and do not require the automatic notifications of available
updates after installation,deselect the Enable Update Tool check box.
Note –
Update Tool differs fromUpgrade Tool,whichis usedto migrate the configurationand
deployed applications fromanearlier versionof GlassFish Server to the current version.For
more informationabout Upgrade Tool,see the GlassFish Server Open Source Edition 3.1
Upgrade Guide.
ReviewtheReadyToInstall selections andclickInstall toproceedwiththeinstallation.
Aprogress bar is displayed as the answer file is created and anempty as-install-parent directory
is created.
Tip –
The configurationresults panel presents the recently executedcommandinthe center
sectionand this is a selectable text.The text canbe copied onto a script for future automated
runs of such commands.
ReviewthesummarypageandclickExit toexit theinstaller.
Installationinformationis captured inlog files.The names of the files are
timestamp-install.log and timestamp-install-summary.html.OnSolaris,Linux,and Mac
OS Xsystems,these files are generated by default inthe/tmp directory.OnWindows systems,
these files are generated inthe %TEMP%directory.
Proceedtotheinstructions in
“ReviewingtheInstallationAnswer File”onpage40
.
ReviewingtheInstallationAnswer File
The answer file generated using the procedure described in