Sun ONE Application Server 7 Installation Guide |
Chapter 7
Post-installation TasksThis chapter discusses some tasks you may need to perform during or after installing the Sun Open Net Environment (Sun ONE) Application Server 7 software.
The following topics are addressed here:
Setting the PATH Environment VariableAfter installing the Sun ONE Application Server software, you will need to configure your environment to include the bin directory of the Sun ONE Application Server if you are going to do any of the following:
This section explains how to add the install_dir/bin directory to your PATH environment variable. If you are familiar with the process of setting environment variables, do so now in your own environment. Otherwise, refer to one of the following sections:
Setting the PATH Variable on UNIX
On UNIX systems, it is recommended that you add the install_dir/bin directory of the Sun ONE Application Server to your login profile so it is automatically added to your environment's PATH setting during login.
- Set your PATH variable to include the install_dir/bin directory.
- Verify that the asadmin command can be found by running the asadmin command as follows:
asadmin
The following should appear on your screen:
Use "exit" to exit and "help" for online help
asadmin>_
If the command is not found, check your PATH setting, refresh your environment settings, and run asadmin again.
Setting the Microsoft Windows Environment
This section explains the steps for setting your Microsoft Windows environment:
Setting the Microsoft Windows PATH Variable
On Microsoft Windows, it is recommended that you modify the system PATH environment variable using the Microsoft Windows control panel as follows:
- Click the Microsoft Windows Start button, choose Settings, then Control Panel.
- In the Control Panel, double-click System.
- Click the Advanced tab, then choose Environment Variables.
The Environment Variables dialog box lists the environment variables that apply to your current user account as well as to the system as a whole.
- Select the existing PATH entry and click Edit or click New to create a new PATH environment variable.
- Add the install_dir/bin value to the beginning of the PATH value.
For example, add C:\Sun\AppServer7\bin; to the front of the variable value.
- Click OK to close the Edit User Variable dialog window.
The PATH variable should reflect the directory path that you just entered.
- Click OK to apply the changes and to close the Environment Variables Window.
- Click OK to close the System Properties window.
- Verify that asadmin is available as follows:
- Click the Microsoft Windows Start button, then choose Run.
- In the Open field, enter cmd and click OK.
- When the command window is displayed, type asadmin at the command prompt. The following should display:
C:\>asadmin
Use "exit" to exit and "help" for online help
asadmin>
- If your PATH variable is not set correctly, the following is displayed:
'asadmin' is not recognized as an internal or external command, operable program or batch file.
In this case, go back into the Control Panel, fix your PATH setting, and run the asadmin command again from a new command window. Only a new command window will pick up the environment variable change.
- Type exit to quit the command-line interface.
Setting the net Command
On some Windows 2000 systems, the Microsoft Windows net command is not automatically made available to the environment through the system PATH environment variable. This Microsoft Windows utility is used to start and stop the Sun ONE Application Server software.
To determine whether or not the net command is available in your environment, perform the following steps:
- Click the Microsoft Windows Start button, then choose Run.... to launch a command console window.
- In the Open field, type cmd and click OK.
- After the console starts, type net at the command prompt.
- If the net command is not found, modify the system PATH environment variable to include your Windows_install_root\system32 directory. For example:
C:\WINNT\system32;
Viewing Man PagesTo view man pages at the command line while using the Sun ONE Application Server product:
Starting and Stopping the ServerSince the Sun ONE Application Server is not automatically started during installation, you will need to start the application server environment and verify that it is running properly before you can deploy and exercise the sample application.
To start the Sun ONE Application Server on a UNIX or Microsoft Windows machine, you can use either of the following methods:
In addition, on Microsoft Windows you can use the following facilities:
Using the Command-line Interface
You will need to configure your environment to include the bin directory of the Sun ONE Application Server before you can run the command-line utility. Instructions for doing this are contained in "Setting the PATH Environment Variable".
You can use the asadmin command-line interface to start and stop:
The subcommands of asadmin listed in the following table are relevant to start and stop operations.
Table 7-1 Start/Stop Subcommands of asadmin
Subcommand
Description
start-appserv
Starts the entire Sun ONE Application Server.
stop-appserv
Stops the Sun ONE Application Server.
start-domain
Starts the administrative server and application server instances of the specified administrative domain.
Solaris 9 bundled users: You must create a domain before using this command. See “"Setting the Microsoft Windows PATH Variable".
stop-domain
Stops the administrative server and the application server instances of the specified administrative domain.
start-instance
Starts the specified application server instance. Can be run in either a local or remote mode. In local mode, running this subcommand does not require the administrative server to be running.
stop-instance
Stops the specified application server instance. Similar in operation to start-instance.
Using start-domain and stop-domain
If the Sun ONE Application Server is running, use the following command to stop both the Admin Server as well as the application server instance of the initially configured domain:
where domain1 is the default name of the administrative domain defined during installation of the Sun ONE Application Server.
As the command completes, you should observe the following results:
Likewise, you can start the initially-configured administrative domain by running the following command:
As the command completes, you should observe the following results:
Using start-instance and stop-instance
To stop a specific application server instance without relying on the presence of an Admin Server, you can use the following command:
where server1 is the default name of the application server instance. If your environment contains more than one administrative domain, then you need to specify the administrative domain name when invoking the stop-instance command. For example:
To start a specific application server instance in local mode, you can use the following command:
If you want to start or stop an instance on a remote system, you can specify the target Admin Server and administrative user name and password on the start-instance and stop-instance commands.
Getting Helpful Information
If you run either of these subcommands without parameters, usage information is displayed. For example:
Alternatively, you can issue the subcommands followed by the --help option to obtain complete usage information.
Using the Administration Interface
When the Admin Server is running, you can use the web-based Administration interface to start and stop application server instances.
- Start the Administration interface (also called the Admin Console).
- On UNIX—Open a browser window and specify the location of your Admin Server’s console application.
During installation, the default port number for the Admin Server is set to 4848. If this port was already in use, or you selected another port number, specify that port number. For example:
http://localhost:4848
- On Microsoft Windows—The easiest means of starting the web-based Administration interface is to click the Microsoft Windows Start button, then select Programs, Sun Microsystems, Sun ONE Application Server 7, Start Admin Console.
After selecting Start Admin Console, a window of your default browser will be launched with the appropriate location of the administrative server's console as set during installation.
- Sign into the Administration interface using the administrative user name and password specified during installation.
After you've been successfully authenticated, the initial screen of the Administration interface is displayed as follows.
- Select the server1 node to access the start and stop functions.
The application server instance is either in a Running or Not Running state.
- Depending on the server instance state, click either Start or Stop to start or stop the application server instance.
Using the Microsoft Windows Program Group
On Microsoft Windows, the easiest means of starting the entire application server is to access the Microsoft Windows program group.
- Click the Microsoft Windows Start button, then select Programs, Sun Microsystems, Sun ONE Application Server 7, Start Application Server.
- To completely stop the application server, access the Sun ONE Application Server menu item in the Microsoft Windows program group.
This action will stop both the administrative server and the configured application server instances.
Using Microsoft Windows Services
After Sun ONE Application Server installation, several Microsoft Windows services are defined to control the startup and shutdown of the Admin Server and the initially-defined application server instance (server1). This section describes how to use these services to control the application server processes.
- Click the Microsoft Windows Start button, choose Settings, then Control Panel.
- When the Control Panel is displayed, doubleclick Administrative Tools.
- When the Administrative Tools are displayed, double-click Services to view the services installed on your system.
- Scroll down to view the Sun Application Server entries as shown in the following screen capture.
There are separate Microsoft Windows services for the Admin Server and the initially-configured application server instance, server1. When the Admin Server and the application server instance are running, the Status column of each service entry should say Started.
- If the Admin Server and the application server instance have been stopped, start them again by using the Microsoft Windows services. That is, instead of using the Stop command when right-clicking a service, use the Start command.
Implementing the Web Server PluginThe web server plugin is an HTTP reverse proxy plugin that allows you to instruct a Sun ONE Web Server or Sun ONE Application Server to forward certain HTTP requests to another server.
The web server plugin must be installed and configured manually. For instructions, refer to the Configuring the Web Server Plugin chapter in the Sun ONE Application Server Administrator’s Guide.
Implementing the Web Services ClientTo install and configure the web services client, refer to the Sun ONE Application Server Developer's Guide to Clients.
Deciding Where to Install the Sun ONE Studio PluginIf you have Sun ONE Studio pre-installed on your system, you can select Support for Sun ONE Studio on the component selection screen during the Sun ONE Application Server installation. When you subsequently enter the Sun ONE Studio 4 installation directory, the installation program will check that directory to be sure the proper Sun ONE Studio files are present.
The Sun ONE Studio 4 plugin can be installed in the Studio user directory or in the Studio installation directory. If the plugin is installed in the user directory, removing the user directory will uninstall the plugin module. To make a decision about where to install the Sun ONE Studio 4 plugin, you need to be aware of the following installation scenarios.
- Scenario 1—The Sun ONE Application Server installation program installs the plugin in the Studio installation directory. Deleting the Studio user directory does not affect the plugin module.
Note
The Sun ONE Application Server installation program can be used only once to install the Sun ONE Studio 4 plugin, after which the option is disabled.
- Scenario 2—You direct the Sun ONE Application Server installation program to install the plugin in the Sun ONE Studio 4 user directory. Deleting the Studio user directory removes the plugin module.
- Scenario 3—You install the plugin using the Sun ONE Studio 4 update center, which installs the plugin in the Studio user directory. Deleting the Studio user directory removes the plugin module.
For post-installation configuration information, see the Sun ONE Studio 4, Enterprise Edition for Java with Application Server 7 Tutorial available here:
Accessing the Sample ApplicationsAfter you have verified your installation, you can tour the features of Sun ONE Application Server by running the sample applications. For more information, refer to install_dir/samples/index.html.