Glassfish Installation Guide
Glassfish Installation Guide
Glassfish Installation Guide
Sun Microsystems, Inc. has intellectual property rights relating to technology embodied in the product that is described in this document. In particular, and without
limitation, these intellectual property rights may include one or more U.S. patents or pending patent applications in the U.S. and in other countries.
U.S. Government Rights – Commercial software. Government users are subject to the Sun Microsystems, Inc. standard license agreement and applicable provisions
of the FAR and its supplements.
This distribution may include materials developed by third parties.
Parts of the product may be derived from Berkeley BSD systems, licensed from the University of California. UNIX is a registered trademark in the U.S. and other
countries, exclusively licensed through X/Open Company, Ltd.
Sun, Sun Microsystems, the Sun logo, the Solaris logo, the Java Coffee Cup logo, docs.sun.com, Java, and Solaris are trademarks or registered trademarks of Sun
Microsystems, Inc. or its subsidiaries in the U.S. and other countries. All SPARC trademarks are used under license and are trademarks or registered trademarks of
SPARC International, Inc. in the U.S. and other countries. Products bearing SPARC trademarks are based upon an architecture developed by Sun Microsystems, Inc.
The OPEN LOOK and SunTM Graphical User Interface was developed by Sun Microsystems, Inc. for its users and licensees. Sun acknowledges the pioneering efforts
of Xerox in researching and developing the concept of visual or graphical user interfaces for the computer industry. Sun holds a non-exclusive license from Xerox to
the Xerox Graphical User Interface, which license also covers Sun's licensees who implement OPEN LOOK GUIs and otherwise comply with Sun's written license
agreements.
Products covered by and information contained in this publication are controlled by U.S. Export Control laws and may be subject to the export or import laws in
other countries. Nuclear, missile, chemical or biological weapons or nuclear maritime end uses or end users, whether direct or indirect, are strictly prohibited. Export
or reexport to countries subject to U.S. embargo or to entities identified on U.S. export exclusion lists, including, but not limited to, the denied persons and specially
designated nationals lists is strictly prohibited.
DOCUMENTATION IS PROVIDED “AS IS” AND ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, INCLUDING ANY
IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE DISCLAIMED, EXCEPT TO
THE EXTENT THAT SUCH DISCLAIMERS ARE HELD TO BE LEGALLY INVALID.
Copyright 2009 Sun Microsystems, Inc. 4150 Network Circle, Santa Clara, CA 95054 U.S.A. Tous droits réservés.
Sun Microsystems, Inc. détient les droits de propriété intellectuelle relatifs à la technologie incorporée dans le produit qui est décrit dans ce document. En particulier,
et ce sans limitation, ces droits de propriété intellectuelle peuvent inclure un ou plusieurs brevets américains ou des applications de brevet en attente aux Etats-Unis
et dans d'autres pays.
Cette distribution peut comprendre des composants développés par des tierces personnes.
Certaines composants de ce produit peuvent être dérivées du logiciel Berkeley BSD, licenciés par l'Université de Californie. UNIX est une marque déposée aux
Etats-Unis et dans d'autres pays; elle est licenciée exclusivement par X/Open Company, Ltd.
Sun, Sun Microsystems, le logo Sun, le logo Solaris, le logo Java Coffee Cup, docs.sun.com, Java et Solaris sont des marques de fabrique ou des marques déposées de
Sun Microsystems, Inc., ou ses filiales, aux Etats-Unis et dans d'autres pays. Toutes les marques SPARC sont utilisées sous licence et sont des marques de fabrique ou
des marques déposées de SPARC International, Inc. aux Etats-Unis et dans d'autres pays. Les produits portant les marques SPARC sont basés sur une architecture
développée par Sun Microsystems, Inc.
L'interface d'utilisation graphique OPEN LOOK et Sun a été développée par Sun Microsystems, Inc. pour ses utilisateurs et licenciés. Sun reconnaît les efforts de
pionniers de Xerox pour la recherche et le développement du concept des interfaces d'utilisation visuelle ou graphique pour l'industrie de l'informatique. Sun détient
une licence non exclusive de Xerox sur l'interface d'utilisation graphique Xerox, cette licence couvrant également les licenciés de Sun qui mettent en place l'interface
d'utilisation graphique OPEN LOOK et qui, en outre, se conforment aux licences écrites de Sun.
Les produits qui font l'objet de cette publication et les informations qu'il contient sont régis par la legislation américaine en matière de contrôle des exportations et
peuvent être soumis au droit d'autres pays dans le domaine des exportations et importations. Les utilisations finales, ou utilisateurs finaux, pour des armes nucléaires,
des missiles, des armes chimiques ou biologiques ou pour le nucléaire maritime, directement ou indirectement, sont strictement interdites. Les exportations ou
réexportations vers des pays sous embargo des Etats-Unis, ou vers des entités figurant sur les listes d'exclusion d'exportation américaines, y compris, mais de manière
non exclusive, la liste de personnes qui font objet d'un ordre de ne pas participer, d'une façon directe ou indirecte, aux exportations des produits ou des services qui
sont régis par la legislation américaine en matière de contrôle des exportations et la liste de ressortissants spécifiquement designés, sont rigoureusement interdites.
LA DOCUMENTATION EST FOURNIE "EN L'ETAT" ET TOUTES AUTRES CONDITIONS, DECLARATIONS ET GARANTIES EXPRESSES OU TACITES
SONT FORMELLEMENT EXCLUES, DANS LA MESURE AUTORISEE PAR LA LOI APPLICABLE, Y COMPRIS NOTAMMENT TOUTE GARANTIE
IMPLICITE RELATIVE A LA QUALITE MARCHANDE, A L'APTITUDE A UNE UTILISATION PARTICULIERE OU A L'ABSENCE DE CONTREFACON.
090305@21990
Preface
This Installation Guide contains instructions for installing and uninstalling Enterprise Server.
This preface contains information about and conventions for the entire Sun GlassFishTM
Enterprise Server documentation set.
Documentation Center Enterprise Server documentation topics organized by task and subject.
Release Notes Late-breaking information about the software and the documentation. Includes a
comprehensive, table-based summary of the supported hardware, operating system, JavaTM
Development Kit (JDKTM), and database drivers.
Quick Start Guide How to get started with the Enterprise Server product.
Application Deployment Guide Deployment of applications and application components to the Enterprise Server. Includes
information about deployment descriptors.
Developer’s Guide Creating and implementing Java Platform, Enterprise Edition (Java EE platform) applications
intended to run on the Enterprise Server that follow the open Java standards model for Java
EE components and APIs. Includes information about developer tools, security, debugging,
and creating lifecycle modules.
Java EE 5 Tutorial Using Java EE 5 platform technologies and APIs to develop Java EE applications.
Java WSIT Tutorial Developing web applications using the Web Service Interoperability Technologies (WSIT).
Describes how, when, and why to use the WSIT technologies and the features and options
that each technology supports.
Administration Guide System administration for the Enterprise Server, including configuration, monitoring,
security, resource management, and web services management.
3
Preface
High Availability Administration Setting up clusters, working with node agents, and using load balancers.
Guide
Reference Manual Utility commands available with the Enterprise Server; written in man page style. Includes
the asadmin command line interface.
as-install Represents the base installation directory for SolarisTM and Linux installations, non-root user:
Enterprise Server.
user’s-home-directory/SUNWappserver
Solaris and Linux installations, root user:
/opt/SUNWappserver
Windows, all installations:
SystemDrive:\Sun\AppServer
Typographic Conventions
The following table describes the typographic changes that are used in this book.
AaBbCc123 The names of commands, files, and Edit your .login file.
directories, and onscreen computer
Use ls -a to list all files.
output
machine_name% you have mail.
AaBbCc123 A placeholder to be replaced with a real The command to remove a file is rm filename.
name or value
AaBbCc123 Book titles, new terms, and terms to be Read Chapter 6 in the User's Guide.
emphasized (note that some emphasized
A cache is a copy that is stored locally.
items appear bold online)
Do not save the file.
Symbol Conventions
The following table explains symbols that might be used in this book.
{|} Contains a set of choices for a -d {y|n} The -d option requires that you use
required command option. either the y argument or the n
argument.
- Joins simultaneous multiple Control-A Press the Control key while you press
keystrokes. the A key.
+ Joins consecutive multiple Ctrl+A+N Press the Control key, release it, and
keystrokes. then press the subsequent keys.
5
Preface
→ Indicates menu item File → New → Templates From the File menu, choose New.
selection in a graphical user From the New submenu, choose
interface. Templates.
Note – Sun is not responsible for the availability of third-party web sites mentioned in this
document. Sun does not endorse and is not responsible or liable for any content, advertising,
products, or other materials that are available on or through such sites or resources. Sun will not
be responsible or liable for any actual or alleged damage or loss caused or alleged to be caused by
or in connection with use of or reliance on any such content, goods, or services that are available
on or through such sites or resources.
To share your comments, go to http://docs.sun.com and click Feedback. In the online form,
provide the document title and part number. The part number is a seven-digit or nine-digit
number that can be found on the title page of the book or at the top of the document.
This chapter provides instructions for installing the Sun GlassFish Enterprise Server software
available from the Sun download site. It also has instructions on how to install GlassFish , the
open source implementation of Sun GlassFish Enterprise Server.
You can choose to use either the file-based installer available from the Sun Download site or the
JAR-based installer available from java.net. The following topics are discussed:
■ “Distribution Types and Their Components” on page 7
■ “Installing Sun GlassFish Enterprise Server With File-based Installer” on page 8
■ “Installing Sun GlassFish Enterprise Server With JAR-based Installer” on page 16
■ “Registering Your Installation of Sun GlassFish Enterprise Server” on page 18
7
Installing Sun GlassFish Enterprise Server With File-based Installer
Solaris and Linux installations support both root and non-root user installations. Users of
Windows installations should have Power User or Administrator access. If you are installing as
a non-root user on Solaris or Linux, you must have read-write access to the following
directories:
■ The installation directory you select
■ The home directory of the installation user
■ The /var/tmp directory
■ The /tmp directory
■ The web server installation directory and the web server instance directory, if applicable.
2 If you have downloaded a .bin file, change the permission of the distribution file so that you
have execute access:
chmod +x distribution_filename
■ If you are installing from a .bin file on Solaris or Linux, use the following command to run
the installation program :
./distribution_filename
Use the -console option to run the installation program in command-line mode. Use the
-javahome option if you are running the installation on a Solaris x86 machine,
■ If you are installing from an .exe file on Windows, double-click the file.
Note – If you are installing Sun GlassFish Enterprise Server on a 64–bit machine (running a
64–bit operating system), use a 32–bit JDK to install Sun GlassFish Enterprise Server on your
64–bit machine. You will need to use the following command: ./distribution_filename
—javahome path to 32–bit JDK location
5 Select the components to install. If you are not using Sun GlassFish Enterprise Server with HADB
bundle, skip to the next step.
If a component is disabled, the installation program has detected it as already installed on your
system.
The following components are available for installation:
■ Node Agent – All machines that contain application server instances should have a node
agent installed.
■ High Availability Database Server -This component stores session information so requests
can be failed over if you are using the load balancing plugin.
■ Load Balancing Plugin - Install the load balancing plugin on the machine where a web server
is installed. If you do not already have a web server installed on the machine where you are
installing the load balancing plugin, you cannot continue to install the load-balancer plugin.
■ Domain Administration Server and Administration Tool - The Domain Administration
Server (DAS) acts as a central repository for applications and configuration information for
server instances, even if the instances are located on a remote machine. It includes graphical
and command-line administration tools.
■ Command Line Administration Tool Only - Install the Command Line Administration tool
on machines which do not contain a DAS, but from which you want to communicate with
the DAS or a node agent. For example, install the command-line administration tool on
machines from which you plan to remotely administer the Enterprise Server using the
command-line administration tools.
■ No Administration Tools - Use this option when installing components on a machine that
already contains the administration tools, or on which no administration tools are required.
For example, when installing the load balancing plugin on a machine with a web server, but
no Application Server, no Application Server administration tools are required.
■ Sample Applications - Samples come with the source, schema, Ant build scripts, and EAR
files. Any existing data associated with the database-related samples is available in the
included Java DB database.
6 In the Administration Configuration page (or when prompted at the command line), enter the
following fields and click Next.
■ Admin User Name – Name of the user who administers the server.
■ Password – Admin user’s password to access the Admin Server (8-character minimum).
■ Choose whether you want to be prompted for the Admin User Name and Password.
■ Admin Port – Administration port number for initial server instance. The default value is
4848.
■ HTTP Port - Port number to access the default server instance. The default is 8080
■ HTTPS Port - Secure port number to access the default server instance. The default is 8181
7 In the Installation Options page, select the options that you want. Click Next
The following installation options are available:
■ Enable UpdateCenter Client – Select this option to enable Updatecenter to check for
available updates and collect system data.
■ Create Desktop Shortcut to the AutoDeploy directory – Select this option to automatically
deploy items dragged to this directory. You see this option only if you are using Windows.
■ Add bin Directory to PATH – Select this option to add as-install/bin to the PATH variable
for simplifying the process of running the server and tools from the command line. You see
this option only if you are using Windows.
■ Create Windows Service – Select this option to create a Windows service to start and stop
Application Server,
Note – To create a Windows service, the sc.exe utility must be available on the system.
Windows 2000 users may need to install the Windows 2000 Resource Kit to get this utility.
For other supported Windows versions, the utility is included in the operating system.
9 After installation completes, use the Registration Options screen for registering your
installation of application server. For instructions, see “To Register Your Installation of Sun
GlassFish Enterprise Server”on page 18.
10 Verify the installation by following the procedures in the Sun GlassFish Enterprise Server 2.1
Quick Start Guide, located in as-install/docs/QuickStart.html or on docs.sun.com.
Note – Do not use the silent mode installation for upgrading your Enterprise Server installation.
1 Create the installation configuration file by running one of the following commands:
Note – If you do not include a path to the installation configuration file, the file is created in the
directory where you are running the installation program.
Valid
Variable Name Values Content Comments
Default installation
defaultInstallDirectory
directory path.
Selected absolute
currentInstallDirectory installation directory
path.
INST_JMS_PORT 0 - 65535 JMS port number for If the configuration file does not
initial server instance. include this entry, default value of
7676 is used.
INST_ORB_PORT 0 - 65535 ORB port number for If the configuration file does not
initial server instance. include this entry, default value of
3700 is used.
INST_ORB_SSL_PORT 0 - 65535 Secure ORB port number If the configuration file does not
for initial server instance. include this entry, default value of
3820 is used.
INST_JMX_PORT 0 - 65535 JMX port number for If the configuration file does not
initial server instance. include this entry, default value of
8686 is used.
SELECTED_ADDONS JBI Add-ons selected for Valid for Java EE SDK SOA
installation. If no add-ons Starter Kit Preview installations
are selected, the value is only and is disregarded
blank. otherwise.
CREATE_DAS TRUE, Creates a DAS if set to Creates the default domain and
FALSE TRUE. The default installs the software components
domain is named domain1 that are required to run the DAS.
and is created under
default domain-root-dir.
CREATE_NA TRUE, Creates a node agent if set Creates the default node agent
FALSE to TRUE. The default and installs the software
node agent would be components that are required to
named agent1 and is run the node agent.
created under default
node agents root.
PLUGIN_TYPE Sun Java Type of web server on Used only when the load
System which the load balancing balancing plug-in component is
Web plug-in will be selected for installation.
Server, installed/configured.
Apache
HTTP
Server, or
Microsoft
IIS Web
Server.
3 Copy your installation configuration file to each machine where you plan to install the software.
4 Copy the Enterprise Server distribution file to each machine where you plan to install the
software.
6 Start silent installation at the command line using one of the following command formats:
■ On Solaris or Linux:
./distribution_filename -silent configuration_filename
■ On Windows:
distribution_filename -silent configuration_filename
The installation program reads the specified configuration_filename, checks for adequate disk
space, then installs the product based on the data in configuration_filename.
When the prompt is returned, the silent installation is complete and the installation
components are installed on your systems.
#
# Install Wizard Statefile section for Sun GlassFish Enterprise Server
#
#
[STATE_BEGIN Sun GlassFish Enterprise Server f99a6]
defaultInstallDirectory = /SUNWappserver
currentInstallDirectory = /space/SGES
JDK_LOCATION = /usr/jdk/instances/jdk1.5.0
INST_ASADMIN_USERNAME = admin
INST_ASADMIN_PASSWORD = nqbfxnkdghabkygbdpqzvanqzva
INST_MASTER_PASSWORD = plvrdlcijaefpjlodfgiunatrvg
INST_ASADMIN_PORT = 4848
INST_ASWEB_PORT = 8080
INST_HTTPS_PORT = 8181
STORE_ADMIN_AUTH = TRUE
ADMIN_PASSWORD_ENCRYPTED = TRUE
INST_JMS_PORT = 7676
INST_ORB_PORT = 3700
INST_ORB_SSL_PORT = 3820
INST_ORB_MUTUALAUTH_PORT = 3920
INST_JMX_PORT = 8686
CREATE_DESKTOP_SHORTCUT = FALSE
UPDATE_PATH = FALSE
CREATE_UPDATE_ICON =
CREATE_WINDOWS_SERVICE = FALSE
[STATE_DONE Sun GlassFish Enterprise Server f99a]
2 Set the environment variable JAVA_HOME to point to the directory in which JDK 5 is installed.
Note – If you have trouble running this command, run this command with a higher —Xmx value.
Example, java -Xmx512m -jar filename.jar
7 Use the Admin Console to register your installation of GlassFish. Start GlassFish using the
instructions in the Quick Start guide.
You can download the load balancing plug-in from the following locations:
■ Solaris (SPARC): http://download.java.net/javaee5/external/SunOS/aslb/jars/
■ Solaris (x86): http://download.java.net/javaee5/external/SunOS_X86/aslb/jars/
■ Linux: http://download.java.net/javaee5/external/Linux/aslb/jars/
■ Windows: http://download.java.net/javaee5/external/WINNT/aslb/jars/
■ Mac OS: http://download.java.net/javaee5/external/Darwin/aslb/jars/
1 Before you install the load balancer plug-in, ensure that you have installed a supported web
server. For a list of supported web servers, see “Web Servers”in Sun GlassFish Enterprise
Server 2.1 Release Notes.
Ensure that you have exported the certificate required during installation. For details, see
TBDlink.
3 Unjar this file in the lbplugin directory. Run the following command: jar -xvf
<lbplugin>.jar.
4 Unzip the following two files: SUNWaslb.zip and SUNWaspx.zip in the same directory. Delete
the zip files.
5 Change permissions on all shared libraries within lbplugin directory. Run the following
command: chmod -R 755 ${glassfish.home}/lib/lbplugin/lib.
6 Create a configuration for the load balancer. See “Setting up Load Balancing”in Sun GlassFish
Enterprise Server 2.1 Quick Start Guide.
7 Restart the Web Server after creating a configuration for the load balancer.
Next Steps You need to configure Web Server for load balancing. For detailed instructions on manually
configuring Web Server for load balancing, see “Configuring Sun Web Server” in Sun GlassFish
Enterprise Server 2.1 High Availability Administration Guide.
Note – If you create a Sun Online Account while registering Enterprise Server, you are prompted
only for the required information. You can provide additional, optional information by
updating your Sun Online Account (https://reg.sun.com/updateaccount).
■ If you already have a Sun Online Account, provide the required information as follows:
b. In the User Name field, type the user name that you specified when registered for your
Sun Online Account.
c. In the Password field, type that you specified when registered for your Sun Online
Account.
d. Click Register.
■ If you do not have a Sun Online Account, provide the required information as follows:
c. In the Password field, type the password to use for your Sun Online Account.
The password is case sensitive and must be 6 – 10 characters long.
d. In the Retype Password field, retype the password that you typed in the preceding step.
■ Choose the Skip Registration option if you want to register later through the Admin Console
or through the Update Center.
This chapter has instructions for uninstalling Enterprise Server file-based installations and for
JAR installations. It is important to use the uninstall routine described here. If you attempt
another method, problems arise when you try to reinstall the same version or when you install a
newer version.
Before you run the uninstallation program, stop all clustered instances and node agents, if any,
and then stop all domains. If you do not stop all domains before the uninstallation, orphaned
processes might exist on your system after the uninstallation. On UNIX® platforms, identify the
processes using the ps -ef command and terminate them using the kill command. Stop
HADB and any associated ma processes, if you are using HADB.
21
Uninstalling Sun GlassFish Enterprise Server with JAR-Based Installer
■ Under the Sun Microsystems, Application Server program group in the Start Programs area
of your desktop, click Uninstall.
c. From the list of installed programs, select Sun GlassFish Enterprise Server.
d. Click Remove.
Next Steps After uninstallation is complete, carefully examine the installation directory contents and
remove the remaining files or directories that you do not require.
Make sure that you have stopped all domains and other related processes, command prompts
using the installation directory or its subdirectories, and any applications using Java Platform,
Standard Edition (Java SE) files bundled with the product.