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:
Installing Sun GlassFish Enterprise Server With File-based Installer
Installing Sun GlassFish Enterprise Server With JAR-based Installer
Registering Your Installation of Sun GlassFish Enterprise Server
The various distributions and their components are as follows:
Sun GlassFish Enterprise Server - Includes the application server software, HTTP load balancer, Java DB, and Message Queue 4.1. Enterprise Server is available from http://www.sun.com/download as a file-based installer, which offers both graphic and command-line modes for installation. JDK 1.5.0_14 is bundled with the file-based installer for Enterprise Server.
GlassFish: Open source implementation of Sun GlassFish Enterprise Server. This distribution is available as a JAR file from https://glassfish.dev.java.net/public/downloadsindex.html and includes an Ant distribution that has been extended with tasks to facilitate developing applications.
If you are using the Sun GlassFish Enterprise Server file-based installer available from the Sun Download page , use one of the following procedures:
Use this procedure if you are using the Graphic User Interface (GUI) or Command-Line Interface (CLI) mode of the file-based installer for Sun GlassFish Enterprise Server. Verify that your system meets the requirements specified in the Release Notes.
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.
Navigate to the directory where you downloaded the distribution file.
If you have downloaded a .bin file, change the permission of the distribution file so that you have execute access:
chmod +x distribution_filename
Run the installation program.
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.
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
After installation, download the 64–bit JDK from java.sun.com. Edit the value of the AS_JAVA variable in the asenv.conf file to point to the 64–bit JDK installation, so that Sun GlassFish Enterprise Server uses the 64–bit JDK.
Read and accept the license agreement.
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.
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
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,
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.
On the Ready to Install page, click Install Now.
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.
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.
You can use this procedure only with the Sun GlassFish Enterprise Server file-based installer. GlassFish does not offer silent mode installation. The silent mode involves using a installation configuration file for installing in a non-interactive mode.
Do not use the silent mode installation for upgrading your Enterprise Server installation.
Create the installation configuration file by running one of the following commands:
On Solaris or Linux for GUI mode:
./distribution_filename -savestate configuration_filename
On Solaris or Linux for CLI mode:
./distribution_filename -console -savestate configuration_filename
On Windows for GUI mode:
distribution_filename -savestate configuration_filename
On Windows for CLI mode:
distribution_filename -console -savestate configuration_filename
The installation configuration file is created when you use the savestate option when starting an interactive installation. During the interactive installation, your input is collected and stored in the configuration file you specified. This file forms the template for silent installation, which you can use later to install the product on one or more machines. If needed, you can modify the installation configuration file.
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.
Modify the following variables in the installation configuration file, as required.
Variable Name |
Valid Values |
Content |
Comments |
Build ID |
The string of characters following the distribution in the STATE_BEGIN and STATE_END sections. This value is automatically generated. |
No need to alter this value unless installing a different distribution file than the one that produced the configuration file. To find the build ID, enter distribution_filename -id at the command prompt. |
|
defaultInstallDirectory |
Default installation directory path. | ||
currentInstallDirectory |
Selected absolute installation directory path. | ||
INST_ASADMIN_USERNAME |
Administrator user name for initial server instance. | ||
INST_ASADMIN_PASSWORD |
Administrator password for initial server instance. |
This entry is obfuscated by default. See also:ADMIN_PASSWORD_ENCRYPTED. |
|
INST_ASADMIN_PORT |
0 - 65535 |
Administration server port number for initial server instance. |
Default value is 4848. |
INST_ASWEB_PORT |
0 - 65535 |
HTTP port number for initial server instance. |
Default value is 8080. |
INST_HTTPS_PORT |
0 - 65535 |
HTTPS port number for initial server instance. |
Default value is 8081. |
STORE_ADMIN_AUTH |
TRUE, FALSE |
Whether to create admin authentication user preference file. | |
ADMIN_PASSWORD_ENCRYPTED |
TRUE, FALSE |
Obfuscated admin password flag. |
In the initial statefile created by the product installer, this flag is set to TRUE, since the admin password value is obfuscated for security reasons. To override the value for admin password, enter INST_ASADMIN_PASSWORD value in clear text and set this flag to FALSE to enable silent installation to process it correctly. |
INST_JMS_PORT |
0 - 65535 |
JMS port number for initial server instance. |
If the configuration file does not include this entry, default value of 7676 is used. |
INST_ORB_PORT |
0 - 65535 |
ORB port number for initial server instance. |
If the configuration file does not include this entry, default value of 3700 is used. |
INST_ORB_SSL_PORT |
0 - 65535 |
Secure ORB port number for initial server instance. |
If the configuration file does not include this entry, default value of 3820 is used. |
INST_ORB_MUTUALAUTH_PORT |
0 - 65535 |
Mutual authentication ORB port number for initial server instance. |
If the configuration file does not include this entry, default value of 3920 is used. |
INST_JMX_PORT |
0 - 65535 |
JMX port number for initial server instance. |
If the configuration file does not include this entry, default value of 8686 is used. |
CREATE_DESKTOP_SHORTCUT |
TRUE, FALSE |
Whether to create autodeploy folder desktop shortcut. |
Valid for Windows platforms only and is disregarded otherwise. |
UPDATE_PATH |
TRUE, FALSE |
Whether to update PATH environment variable to include Enterprise Server bin directory. |
Valid only for Windows platforms and is disregarded otherwise. If this entry is not present, default value of FALSE is used. |
CREATE_WINDOWS_SERVICE |
TRUE, FALSE |
Whether to create the server as a Windows service. |
Valid for Windows platforms only and is disregarded otherwise. |
SELECTED_ADDONS |
JBI |
Add-ons selected for installation. If no add-ons are selected, the value is blank. |
Valid for Java EE SDK SOA Starter Kit Preview installations only and is disregarded otherwise. |
CREATE_DAS |
TRUE, FALSE |
Creates a DAS if set to TRUE. The default domain is named domain1 and is created under default domain-root-dir. |
Creates the default domain and installs the software components that are required to run the DAS. |
CREATE_NA |
TRUE, FALSE |
Creates a node agent if set to TRUE. The default node agent would be named agent1 and is created under default node agents root. |
Creates the default node agent and installs the software components that are required to run the node agent. |
WEBSERVER_INSTALL_DIR |
A valid, read- writable directory location. |
Installation directory of a supported Web server. |
Used only when the load balancing plug-in component is selected for installation. |
WEBSERVER_INSTANCE_DIR |
A valid read- writable directory location. |
Instance directory of selected web server where the load balancing plug-in will be configured. |
Used when load balancing plug-in component is selected to be installed on Sun Java System Web Server. Not applicable for other web servers. |
PLUGIN_TYPE |
Sun Java System Web Server, Apache HTTP Server, or Microsoft IIS Web Server. |
Type of web server on which the load balancing plug-in will be installed/configured. |
Used only when the load balancing plug-in component is selected for installation. |
PLUGIN_CERTIFICATE_FILE |
A valid path to a certificate file. |
Used only when Apache HTTP Server is selected for load balancing plug-in installation. Not supported or is ignored for other web servers. |
Copy your installation configuration file to each machine where you plan to install the software.
Copy the Enterprise Server distribution file to each machine where you plan to install the software.
Navigate to the directory where you copied the distribution file.
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.
# # # Wizard Statefile created: Tue Nov 25 16:39:31 IST 2008 # Wizard path: /tmp/cs194067/sges-AAAbga4XL/appserv.class # # # 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] |
This section provides instructions for installing GlassFishdistribution, which is available as a JAR-based installer..
Get JDK 5 Update 14 or higher from http://java.sun.com/javase/, if you are using Solaris, Linux, or Windows.
If you are using Mac OS X, you need to download JDK from http://developer.apple.com/java/download/ and make JDK the default JVM.
If you are using AIX, you need to download JDK from http://www.ibm.com/developerworks/systems/library/es-JavaOnAix_install.html and make JDK the default JVM.
Download the GlassFish v2.1 distribution from https://glassfish.dev.java.net/public/downloadsindex.html.
Set the environment variable JAVA_HOME to point to the directory in which JDK 5 is installed.
Run the following command:
java -Xmx256m -jar filename.jar
If you have trouble running this command, run this command with a higher —Xmx value. Example, java -Xmx512m -jar filename.jar
Navigate to the glassfish directory:
cd glassfish
If you are using operating system that is a derivative of UNIX:
chmod -R +x lib/ant/bin
Run one of the following commands:
If you want GlassFish with clustering, run the following command:
lib/ant/bin/ant -f setup-cluster.xml
Or, for Windows: lib\ant\bin\ant -f setup-cluster.xml
If you want GlassFish without clustering, run the following command:
lib/ant/bin/ant -f setup.xml
Or, for Windows: lib\ant\bin\ant -f setup.xml
Use the Admin Console to register your installation of GlassFish. Start GlassFish using the instructions in the Quick Start guide.
Use the procedures in this section if the load balancing plug-in is not part of the distribution you are using.
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/
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.
Create the lbplugin directory within <glassfish_install_dir>/lib.
Unjar this file in the lbplugin directory. Run the following command: jar -xvf <lbplugin>.jar.
Unzip the following two files: SUNWaslb.zip and SUNWaspx.zip in the same directory. Delete the zip files.
Change permissions on all shared libraries within lbplugin directory. Run the following command: chmod -R 755 ${glassfish.home}/lib/lbplugin/lib.
Create a configuration for the load balancer. See Setting up Load Balancing in Sun GlassFish Enterprise Server 2.1 Quick Start Guide.
Restart the Web Server after creating a configuration for the load balancer.
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.
This section explains how to register your installation of Sun GlassFish Enterprise Server with Sun Connection.
You can register your installation of Enterprise Server from the file-based installer. Alternatively, you can register Enterprise Server by using the Registration node in the Admin Console of Enterprise Server or through the Update Center.
To register your installation of Enterprise Server with Sun Connection, you must have a Sun Online Account. If you do not have a Sun Online Account, the Enterprise Server installer enables you to create an account while registering Application Server.
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.
In the Product Registration screen, provide the required information as follows:
If you already have a Sun Online Account, provide the required information as follows:
If you do not have a Sun Online Account, provide the required information as follows:
Select the I Don't Have a Sun Online Account option.
In the Email Address field, type your email address.
Your email address will be your Sun Online Account user name.
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.
In the Retype Password field, retype the password that you typed in the preceding step.
Complete the remaining fields and click Register.
Choose the Skip Registration option if you want to register later through the Admin Console or through the Update Center.