1. Installing GlassFish Server 3.1
Javassist Library License Notice
Installation Files for GlassFish Server 3.1
GlassFish Server Download Locations
GlassFish Server Installation Methods
Choosing an Installation Method
ZIP Package or Self-Extracting Bundle?
Full Platform or Web Profile Distribution?
GlassFish Server Self-Extracting Bundles
HTTP Load Balancer Plug-in for Oracle GlassFish Server
Installing GlassFish Server From a ZIP File
To Install GlassFish Server Using the ZIP File
Installing GlassFish Server From a Self-Extracting Bundle
To Install GlassFish Server Using the Self-Extracting File
To Perform a Custom Installation
Custom Configuration Parameters
Parameters for the Create a server domain Option
Parameters for the Create a standalone server instance Option
Parameters for the Create a clustered server instance Option
Performing a Silent Mode Installation
Creating the Installation Answer File
To Create the Installation Answer File
Installation Command-Line Options
This section describes how to install Oracle GlassFish Server 3.1 using silent mode installation. Silent mode is a non-interactive installation based on user-defined parameters captured in an answer file. The answer file can be used later to install GlassFish Server on one or more systems.
Note - It is only possible to perform a silent installation using the Typical Installation path described in To Install GlassFish Server Using the Self-Extracting File. It is not possible to perform a silent installation using the more complex Custom Installation path described in To Perform a Custom Installation.
The following topics are addressed here:
The answer file forms the template for silent installation. The file is created when you use the dry-run (-n) option to start an interactive installation. In dry-run mode, actual installation does not take place.
During the interactive installation you can accept the default values presented or you can change them. Your input is collected and stored in the answer file, which is then used to install GlassFish Server. You can use the answer file as it is or you can modify the file before using it.
The installation wizard is used to create the answer file. Actual installation does not take place.
Before You Begin
Remember that it is only possible to perform a silent installation using the Typical Installation path described in To Install GlassFish Server Using the Self-Extracting File. It is not possible to perform a silent installation using the more complex Custom Installation path described in To Perform a Custom Installation.
When launching the self-extracting installer from the command-line, it possible to specify several command line options that may be useful to you. See Installation Command-Line Options for more information.
Ensure that your system meets the requirements listed in Hardware and Software Requirements in Oracle GlassFish Server 3.1-3.1.1 Release Notes.
See Known Issues in Oracle GlassFish Server 3.1-3.1.1 Release Notes for known issues related to installation.
See GlassFish Server Download Locations for a list of download locations. See Table 1-4 for a list of available self-extracting bundles.
chmod +x ./self-extracting-file-name
self-extracting-file-name is the name of the self-extracting file that you downloaded.
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 from which the installation program is run.
For example, start the installer in dry-run mode by typing the following:
ogs-3.1-unix.sh -n 31-answer
See Installation Command-Line Options for a list of command-line options you can specify here, if desired.
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 from which the installation program is run.
For example, start the installer in dry-run mode by typing the following:
ogs-3.1-windows.exe -n 31-answer
See Installation Command-Line Options for a list of command-line options you can specify here, if desired.
Note -
Additional setup options are available. See Installation Command-Line Options.
If you are installing on a 64–bit Windows system, run the installer with the -j option pointing to a 64–bit JDK.
Depending on your user privileges and the version of Windows you are running, it may be necessary to run the installer as Administrator. In particular, if you will be configuring the domain as a Service as part of a Custom Installation (see next step) or after the installation, then you should run the installer as Administrator.
After starting the installer, the Introduction page is displayed. Use the Next button to move through the installation process.
It is not possible to use the Custom Installation path when generating an answer file for silent-mode installation.
The default installation directories are as follows:
user-home-directory/glassfish3
SystemDrive\glassfish3
Make sure the directory you specify is empty before installing the product.
The default installation directory is referred to as as-install-parent throughout the GlassFish Server documentation.
Update Tool is an administrative tool that enables you to install updates and add-on components to an existing GlassFish Server 3.1 installation. Update Tool can be installed during GlassFish Server installation or at a later time. For more information about Update Tool, see Update Tool in Oracle GlassFish Server 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 system accesses 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 from Upgrade Tool, which is used to migrate the configuration and deployed applications from an earlier version of GlassFish Server to the current version. For more information about Upgrade Tool, see the Oracle GlassFish Server 3.1 Upgrade Guide.
A progress bar is displayed as the answer file is created and an empty as-install-parent directory is created.
Tip - The configuration results panel presents the recently executed command in the center section and this is a selectable text. The text can be copied on to a script for future automated runs of such commands.
Installation information is captured in log files. The names of the files are timestamp-install.log and timestamp-install-summary.html. On Solaris, Linux, and Mac OS X systems, these files are generated by default in the /tmp directory. On Windows systems, these files are generated in the %TEMP% directory.
The answer file generated using the procedure described in Creating the Installation Answer File provides a number of system-specific parameters as well as parameters that you selected during dry-run mode installation. Values for some parameters can be edited as described in To Edit the Answer File.
The following example shows the contents of an answer file that was created during a dry-run mode installation. All default values were accepted during the installation.
Note - The following example contains a complete answer file, where most of the parameters are not used in GlassFish Server 3.1. For an answer file template that contains only the elements required to perform a typical installation, see the Example 1-2.
Example 1-1 Example Answer File
#openInstaller Dry Run Answer File. This File can be used as input to the openInstaller engine using the -a option. #Sun Jan 16 16:56:14 EST 2011 InstallType.Option.INSTALL_AND_CONFIG=INSTALL_AND_CONFIG UpdateTool.Configuration.PROXY_PORT= SOAccountCreation.accountinfo.FIRSTNAME= ClusteredInstance.Configuration.CLUSTER_NAME=c1 Domain.Configuration.ADMIN_PASSWORD_REENTER= StandaloneInstance.Configuration.SERVER_HOST_NAME=localhost RegistrationOptions.regoptions.USE_EXISTINGACCT=USE_EXISTINGACCT Domain.Configuration.ADMIN_PASSWORD= UpdateTool.Configuration.BOOTSTRAP_UPDATETOOL=true RegistrationOptions.regoptions.USERNAME= StandaloneInstance.Configuration.INSTANCE_NAME=instance1 ClusteredInstance.Configuration.INSTANCE_NAME=instance1 SOAccountCreation.accountinfo.EMAIL= ClusteredInstance.Configuration.SERVER_ADMIN_PORT=4848 Domain.Configuration.CREATE_SERVICE=false ClusteredInstance.Configuration.CREATE_CLUSTER=false InstallUserType.Option.ADVANCED_USER=ADVANCED_USER UpdateTool.Configuration.ALLOW_UPDATE_CHECK=true SOAccountCreation.accountinfo.LASTNAME= RegistrationOptions.regoptions.CREATE_NEWACCT=CREATE_NEWACCT JDKSelection.directory.HIDDEN_JDK= SOAccountCreation.accountinfo.PASSWORD= ConfigType.Option.CREATE_CLUSTEREDINSTANCE=CREATE_CLUSTEREDINSTANCE JDKSelection.directory.JDK_LIST= ClusteredInstance.Configuration.SERVER_HOST_NAME=localhost SOAccountCreation.accountinfo.REENTERPASSWORD= JDKSelection.directory.JDK_TYPED_IN_CHOICE=false UpdateTool.Configuration.PROXY_HOST= InstallType.Option.INSTALL_ONLY=INSTALL_ONLY ConfigType.Option.CREATE_STANDALONEINSTANCE=CREATE_STANDALONEINSTANCE Domain.Configuration.HTTP_PORT=8080 RegistrationOptions.regoptions.SKIP_REGISTRATION=SKIP_REGISTRATION Domain.Configuration.SERVICE_NAME=domain1Service ConfigType.Option.NO_CONFIGURATION=NO_CONFIGURATION Domain.Configuration.ADMIN_USER=admin JDKSelection.directory.JDK_FROM_LIST_CHOICE=false RegistrationOptions.regoptions.USERPASSWORD= SOAccountCreation.accountinfo.COUNTRY= InstallHome.directory.INSTALL_HOME=C\:\\glassfish3 Domain.Configuration.ADMIN_PORT=4848 SOAccountCreation.accountinfo.COMPANYNAME= InstallUserType.Option.BASIC_USER=BASIC_USER ConfigType.Option.CREATE_DOMAIN=CREATE_DOMAIN InstallType.Option.CONFIG_ONLY=CONFIG_ONLY Domain.Configuration.START_SERVER=false Domain.Configuration.DOMAIN_NAME=domain1 ClusteredInstance.Configuration.DOMAIN_NAME=domain1 JDKSelection.directory.JDK_TYPE_IN= StandaloneInstance.Configuration.SERVER_ADMIN_PORT=4848 SOAccountCreation.accountinfo.COUNTRY_DROP_DOWN= RegistrationOptions.regoptions.DUMMY_PROP=
Example 1-2 Answer File Template for GlassFish Server 3.1
#openInstaller Dry Run Answer File. This File can be used as input to the openInstaller engine using the -a option. Domain.Configuration.ADMIN_PASSWORD= Domain.Configuration.ADMIN_PASSWORD_REENTER= Domain.Configuration.ADMIN_PORT=4848 Domain.Configuration.ADMIN_USER=admin Domain.Configuration.DOMAIN_NAME=domain1 Domain.Configuration.HTTP_PORT=8080 InstallHome.directory.INSTALL_HOME=C\:\\glassfish3 UpdateTool.Configuration.ALLOW_UPDATE_CHECK=true UpdateTool.Configuration.BOOTSTRAP_UPDATETOOL=true UpdateTool.Configuration.PROXY_HOST= UpdateTool.Configuration.PROXY_PORT=8888
Some values in the answer file can be changed if desired. Such editing is strictly optional.
Before You Begin
Create the answer file as described in To Create the Installation Answer File.
Review the values that will be used for silent installation.
Only the following default values can be changed:
Provide another directory name for GlassFish Server 3.1 installation files.
Provide a password for access to the Administration Console. This password is case sensitive.
Provide the password confirmation for Administration Console. Make sure that this matches the value for Domain.Configuration.ADMIN_PASSWORD.
Assign another port number to the Administration Console.
Provide another user name for the administrator. This name is case sensitive.
Assign another port number to HTTP connections.
Change value to false if you do not want Update Tool notifications.
Change value to false if you do not want to install the standalone Update Tool.
Assign a name to the proxy host.
Assign a port number to the proxy host.
Note - Parameters not listed are system specific. Do not change system-specific parameters. Doing so will cause problems with the installation program.
The non-interactive installation program reads the specified answer file, checks for adequate disk space, and installs GlassFish Server based on the data in the answer file.
Before You Begin
Create the answer file as described in To Create the Installation Answer File. Verify that the parameters in the answer file are set to the values that you want to use for silent installation, as described in Reviewing the Installation Answer File.
Answer files generated using the GlassFish Server 3.1 installer are not backward-compatible with earlier versions of GlassFish Server including version 3.1.
self-extracting-file-name -a answer-file -s
self-extracting-file-name is the name of the file that you downloaded during Creating the Installation Answer File.
The name of the answer file that was generated according to the instructions in Creating the Installation Answer File. Ensure that you provide the complete path to the answer file.
Runs the installer in silent mode.
For example:
ogs-3.1-unix.sh -a 31-answer -s
When the prompt is returned, the silent installation is complete and the installation components are installed on your system.
Next Steps
Familiarize yourself with the instructions in the Oracle GlassFish Server 3.1 Quick Start Guide. The guide explains how to perform basic tasks such as starting the server, accessing the Administration Console, and deploying a sample application.