Sun Microsystems 2005Q2 User Manual

Sun Java System Application
Server Enterprise Edition 8.1
2005Q2 Quick Start Guide
Sun Microsystems, Inc. 4150 Network Circle Santa Clara, CA 95054 U.S.A.
Part No: 819–2553
This product or document is protected by copyright and distributed under licenses restricting its use, copying, distribution, and decompilation. No part of this product or document may be reproduced in any form by any means without prior written authorization of Sun and its licensors, if any. Third-party software, including font technology, is copyrighted and licensed from Sun suppliers.
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, docs.sun.com, AnswerBook, AnswerBook2, and Solaris are trademarks or registered trademarks of Sun Microsystems, Inc. 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 Sun™ 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.
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.
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 2005 Sun Microsystems, Inc. 4150 Network Circle, Santa Clara, CA 95054 U.S.A. Tous droits réservés.
Ce produit ou document est protégé par un copyright et distribué avec des licences qui en restreignent l’utilisation, la copie, la distribution, et la décompilation. Aucune partie de ce produit ou document ne peut être reproduite sous aucune forme, par quelque moyen que ce soit, sans l’autorisation préalable et écrite de Sun et de ses bailleurs de licence, s’il y en a. Le logiciel détenu par des tiers, et qui comprend la technologie relative aux polices de caractères, est protégé par un copyright et licencié par des fournisseurs de Sun.
Des parties de ce produit pourront être dérivées du système Berkeley BSD licenciés par l’Université de Californie. UNIX est une marque déposée aux Etats-Unis et dans d’autres pays et licenciée exclusivement par X/Open Company, Ltd.
Sun, Sun Microsystems, le logo Sun, docs.sun.com, AnswerBook, AnswerBook2, et Solaris sont des marques de fabrique ou des marques déposées, de Sun Microsystems, Inc. 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.
CETTE PUBLICATION EST FOURNIE “EN L’ETAT” ET AUCUNE GARANTIE, EXPRESSE OU IMPLICITE, N’EST ACCORDEE, Y COMPRIS DES GARANTIES CONCERNANT LA VALEUR MARCHANDE, L’APTITUDE DE LA PUBLICATION A REPONDRE A UNE UTILISATION PARTICULIERE, OU LE FAIT QU’ELLE NE SOIT PAS CONTREFAISANTE DE PRODUIT DE TIERS. CE DENI DE GARANTIE NE S’APPLIQUERAIT PAS, DANS LA MESURE OU IL SERAIT TENU JURIDIQUEMENT NUL ET NON AVENU.
050727@12762
Contents
1 Quick Start 5
Variable Names and Default Paths 5
About Application Server Administration 6
Starting the Server 7
Starting the Domain Administration Server 7
To Start the Domain on Solaris and Linux 7
To Start the Domain on Windows 8
Logging in to the Admin Console 9
To Log In to the Admin Console 9
Examining the Log File 11
To View the Domain Administration Server Log File 11
Creating a Cluster 12
To Start the Node Agent 12
To Create a Cluster 12
Deploying an Application 15
To Deploy the Sample Application 15
To Start the Cluster 16
To Verify the Application Deployment 16
Setting up Load Balancing 17
Installing Web Server Software 18
To Install the Web Server Using the Java Enterprise System Installer 18
To Install the Web Server for Stand-Alone Application Server
Installations 18
Installing the Load Balancer Plug-in 19
To Install the Load Balancer Plug-in 19
Creating a Load Balancer Configuration 19
To Create an HTTP Load Balancer Configuration 20
3
Starting Load Balancing 20
Verifying Load Balancing 20
To Verify Load Balancing 21
Cleaning Up 22
To Uninstall Completely 22
To Remove the Sample Cluster Only 23
Where to Go Next 24
2 Quick Start for Setting Up High Availability Failover 25
About High Availability Clusters and HADB 26
HADB Preinstallation Steps 26
To Congure Your System for HADB 27
Installing HADB 28
To Install HADB 28
Starting HADB 28
To Start HADB in a Java Enterprise System Installation on Solaris or Linux 29
To Start HADB in a Java Enterprise System Installation on Windows 29
To Start HADB in a Stand-Alone Installation on Solaris or Linux 29
To Start HADB in a Stand-Alone Installation on Windows 30
Conguring a Cluster and Application for High Availability 30
To Congure a Cluster and Application for High Availability 30
Restarting the Cluster 31
To Restart the Cluster 31
Verifying HTTP Session Failover 32
To Verify HTTP Session Failover 32
Cleaning Up 33
To Uninstall Completely 34
To Remove the Sample Cluster 35
Where to Go Next 37
4 Sun Java System Application Server Enterprise Edition 8.1 2005Q2 Quick Start Guide
CHAPTER 1

Quick Start

Welcome to the Quick Start Guide. This guide is for developers, system administrators, and Application Server administrators who are interested in learning about the capabilities of the Sun Java System Application Server 8.1 2005Q2 software.
This guide describes basic and advanced steps for using Application Server. The steps are presented in the order that you should complete them. The basic steps, which usually require less than 45 minutes to complete, are in these sections:
Starting the Serveron page 7
Creating a Clusteron page 12
Deploying an Applicationon page 15
The advanced steps, which usually require about 45 minutes to complete, are in these sections:
The steps for setting up load balancing, in “Setting up Load Balancing” on page
17
The steps for setting up high availability and failover, in Chapter 2
The nal sections of this guide include instructions for cleaning up and information on sources of information to use after completing this Quick Start Guide.

Variable Names and Default Paths

The following table describes what the variable names and default paths are for the directories used in this guide. Variable names are in the rst column, and default paths are in the second column.
5
Variable Name Description and Path
install-dir By default, the Application Server installation directory is located
here:
Solaris Java Enterprise System installations:
/opt/SUNWappserver/appserver
Linux Java Enterprise System installations:
/opt/sun/appserver/
Windows Java Enterprise System installations:
SystemDrive:\Sun\ApplicationServer
Solaris and Linux stand-alone Application Server installations, non-root user: user_home_directory/SUNWappserver
Solaris and Linux stand-alone Application Server installations, root user: /opt/SUNWappserver
Windows stand-alone installations:
SystemDrive:\Sun\AppServer
domain_root_dir By default, the directory containing all domains is located here:
domain_dir By default, domain directories are located here: domain_root_dir
Solaris Java Enterprise System installations:
/var/opt/SUNWappserver/domains/
Linux Java Enterprise System installations:
/var/opt/sun/appserver/domains/
All other installations: install-dir/domains/
/domain_dir

About Application Server Administration

To enable administrators to manage server instances and clusters running on multiple hosts, Application Server provides these tools:
The Admin Console, a browser-based graphical user interface (GUI)
The asadmin utility, a command-line tool
Programmatic JavaManagement Extensions (JMX) APIs
These tools connect to a server called the Domain Administration Server, a specially designated Application Server instance that intermediates in all administrative tasks. The Domain Administration Server (DAS) provides a single secure interface for validating and executing administrative commands regardless of which interface is used.
6 Sun Java System Application Server Enterprise Edition 8.1 2005Q2 Quick Start Guide
A domain is a collection of conguration data, deployed applications, and machines with a designated administrator. The domain denition describes and can control the operation of several applications, stand-alone application server instances, and clusters, potentially spread over multiple machines. When the DAS is installed, a default domain called domain1 is always installed. You work with the default domain in this guide.
To complete most of the steps presented in this guide, you will use the Admin Console.

Starting the Server

This topic, the rst of three basic topics, provides the following sections
Starting the Domain Administration Serveron page 7
Logging in to the Admin Consoleon page 9
Examining the Log Fileon page 11

Starting the Domain Administration Server

To start the Domain Administration Server, start the default domain, domain 1, using the following procedures.
Note – Because this guide instructs you to set an environment variable
AS_ADMIN_USER for administrative user name, it does not instruct you to supply a user name argument when the asadmin command is used. Without the environment variable, you supply this argument when you type the command. The general syntax is:
asadmin command_verb --user username command_arguments
For example, if your user name is admin, the syntax for asadmin start-domain is: asadmin start-domain --user admin domain1
To Start the Domain on Solaris and Linux
Steps
1. Add the install-dir/bin/ directory to the PATH environment variable.
2. Set the AS_ADMIN_USER environment variable so that you do not need to type it for every command.
Chapter 1 Quick Start 7
Set the value of AS_ADMIN_USER to the admin user you specied when you installed the Application Server. For example, setenv AS_ADMIN_USER admin
3. Start the server by entering this command from the install-dir:
asadmin start-domain domain1
When you are prompted for the admin password and the master password, enter the passwords that you provided during installation.
4. A message appears telling you that the Domain Administration Server is starting:
Starting Domain domain1, please wait. Log redirected to domain_dir/domain1/logs/server.log...
5. When the startup process has completed, an additional message appears:
Domain domain1 started
To Start the Domain on Windows
Steps
1. From the Explorer window or desktop, right click My Computer.
2. Choose Properties to display the System Properties dialog.
3. Click the Advanced tab.
4. Click Environment Variables.
5. In the User variables section:
If a PATH variable exists, verify that install-dir\bin exists in the path: install-dir\bin;other_entries.
If a PATH variable is not present, click New. In Variable Name, type PATH.In Variable Value, type the path to the server’s bin directory: install-dir\bin. Click OK to commit the change.
6. Add a new environment variable AS_ADMIN_USER and set it to the Administrative User Name that you assigned during installation.
7. Click OK to commit the change and close the remaining open windows.
8. Start the Application Server
For Java Enterprise System installations, from the Start menu, choose Programs Sun Microsystems Application ServerStart Admin Server.
For stand-alone installations, from the Start menu, choose Programs Sun Microsystems Application Server EE Start Admin Server.
8 Sun Java System Application Server Enterprise Edition 8.1 2005Q2 Quick Start Guide
9. When a command prompt window opens to prompt you for the admin password and the master password, enter the passwords that you provided during installation.
A window appears with a message telling that you the server is starting:
Starting Domain domain1, please wait. Log redirected to domain_dir\domain1\logs\server.log...
When the startup process has completed, you see an additional message:
Domain domain1 started. Press any key to continue ...
10. Press a key to close the message window.

Logging in to the Admin Console

The Admin Console is a browser interface that simplies a variety of administration and conguration tasks. It is commonly used to:
Deploy and undeploy applications
Enable, disable, and manage applications
Congure resources and other server settings
Congure clusters and node agents
Manage server instances and clusters
Select and view log les
For further information about using the Admin Console, consult the online help or the Sun Java System Application Server Enterprise Edition 8.1 2005Q2 Administration Guide.
To Log In to the Admin Console
Steps
1. Type this URL in your browser:
https:// localhost:4849/asadmin
Because the Admin Console is a secure web application, you must use https instead of http.
Replace the localhost variable with the name of the system that the Domain Admin Server is running on.
4849 is the Admin Consoles default port number. If you changed the port number during the installation, use that number instead.
Chapter 1 Quick Start 9
Note – If a popup window appears with a message such as Website Certified
by an Unknown Authority, click OK.
This message appears because your browser does not recognize the self-signed certicate that the Domain Administration Server uses to service the Admin Console over the secure transmission protocol.
2. When the log in window appears, enter the admin user name and password.
3. Click Log In.
When the Admin Console appears, it looks like this:
In the left pane, select what you want to manage from the tree provided. In the right pane, various administrative tasks are listed under the Common Tasks heading.
Tip – Click the Registration tab to register your software if you have not already
done so.
10 Sun Java System Application Server Enterprise Edition 8.1 2005Q2 Quick Start Guide

Examining the Log File

Application Server instances and the Domain Administration Server produce annotated logs on the le system. By default, all errors, warnings or useful informative messages are logged.
To View the Domain Administration Server Log File
Steps
1. From the Common Tasks list in the right pane, click Search Log Files to launch a new browser window for Log Viewer.
2. In the Log Viewer window, select serverfrom the Instance Name drop–down list and click Search.
The Domain Administration Servers recent log le entries are displayed.
3. Scan the messages and look for any WARNING or SEVERE messages indicating that problems were encountered during server start-up.
You can close Log Viewer at any time. After you create clusters and deploy applications, examine log les if any of the operations failed. Use Log Viewer to view the log les of any running Application Server instance in the domain.
For more information about the log le, see Chapter 16, Conguring Logging,in
Sun Java System Application Server Enterprise Edition 8.1 2005Q2 Administration Guide.
Chapter 1 Quick Start 11
Next Steps

To Start the Node Agent

In this section you started the Domain Administration Server and conrmed that it is running. You also logged in to the Admin Console and used the Log Viewer. You can stop the Quick Start trail here if you do not wish to continue, or you can go on to the next section.

Creating a Cluster

This section, the second of three basic topics, explains how to create a cluster that contains two Application Server instances. For simplicity, the cluster runs completely within one machine. This topic includes the following tasks:
To Start the Node Agent” on page 12
To Create a Clusteron page 12
A node agent is a lightweight process running on each machine that participates in an Application Server administrative domain. The node agent is responsible for starting and stopping server instances on the host. It also collaborates with the Domain Administration Server to create new Application Server instances.
One node agent is needed on a machine, for each Application Server administrative domain that the machine belongs to. If you chose the Node Agent Component during installation, a default node agent called hostname was created.
Steps
1. In a terminal window, type this command:
asadmin start-node-agent hostname
Replace the variable hostname with the name of the host where the Application Server is running.
2. When you are prompted, provide the master password.
The node agent starts and connects with the Domain Administration Server.
Note – If the Domain Administration Server is not running, the node agent might
fail to start.

To Create a Cluster

A cluster is a group of server instances (typically on multiple hosts) that share the same congurations, resources, and applications. A cluster facilitates load balancing across server instances and high availability through failover. You can create clusters
12 Sun Java System Application Server Enterprise Edition 8.1 2005Q2 Quick Start Guide
Loading...
+ 26 hidden pages