wsinstance

 

Tips

 


Overview

wsinstance.sh allows one to create multiple instances of one initial installation of the base WAS product.

Each WAS instance is a standalone instance with a unique name, and its own set of config files and user data folders. Configuration folders include config, etc and properties. User data folders include installedApps, installableApps, temp, logs, tranlog and wstemp. It also has the console application to manage the instance.

It shares all run-time scripts, libraries, the Software Development Kit, and other files with the initial app server.

wsinstance.sh is located in

$INSTALL_DIR/bin/wsinstance

 

Syntax

wsinstance.sh  -name instanceName
               -path instanceLocation
               -host hostName
              [-startingPort startingPort]
               -create|-delete
               -debug

Argument Description
-name Instance name of the new instance. Must be unique. Used to construct the node name: instanceName_hostname
-path File path of the instance. All required folders for the instance are in this directory, which is unique to the instance.
-host Hostname, which is the name of the host on which you are creating the instance.
-create|-delete Create or delete the instance.
-startingPort Optional parameter. Specifies the starting port number for generating all ports for the instance. If not specified, the wsinstance command uses default ports, or custom-defined ports from a file that one can create.

 

Example of startingPort parameter use

The wsinstance command generates an instanceName_portdef.props file in...

$INSTALL_DIR/ bin/wsinstance
...and assigns port numbers in the file to the config instance as it creates the instance.

If you do not use the -startingPort parameter the first time you create a instance, the wsinstance command adds one (1) to the default port numbers for the base WAS product. If you create two instances without using the -startingPort parameter, both instances have the same, conflicting port numbers.

One can create the instanceName_portdef.props file manually with predefined ports. You do not have to specify the -startingPort parameter again. The wsinstance command reads an existing instanceName_portdef.props file, to use the port numbers specified in the file. This command lets you manually create the file and specify the port numbers, before creating the config instance.

Use the template file, portdef.props, to create a new instanceName_portdef.props file, before creating the new instance.

The following example servername_portdef.props file is created with this command:

wsinstance.bat -name servername -path /opt/WebSphere -host venus -startingPort 20002 -create

HTTPS_TRANSPORT_ADMIN=20002
CSIV2_SSL_SERVERAUTH_LISTENER_ADDRESS=20004
HTTP_TRANSPORT_ADMIN=20003
HTTP_TRANSPORT=20005
HTTPS_TRANSPORT=20006
INTERNAL_JMS_SERVER=20007
BOOTSTRAP_ADDRESS=20008
SAS_SSL_SERVERAUTH_LISTENER_ADDRESS=20009
DRS_CLIENT_ADDRESS=20011
SOAP_CONNECTOR_ADDRESS=20010
CSIV2_SSL_MUTUALAUTH_LISTENER_ADDRESS=20012
JMSSERVER_QUEUED_ADDRESS=20013
JMSSERVER_DIRECT_ADDRESS=20014

For example:

wsinstance.sh -name servername -path /usr/servername/WebSphere -host venus -create

On a base WAS product installation, the command creates an app server instance, named servername. This is true for any non-root user on a UNIX-based or Linux platform.

Example of a creating a instance for user servername in a multiuser environment:

1. Create the instance:

>wsinstance.sh -name servername
               -path ~servername/WebSphere
               -host myhos
               -startingPort 12000
               -create


2. Change the owner of the folder:

>chown servername ~servername/WebSphere

3. Add a call to script ~servername/WebSphere/bin/setupCmdLine.sh in the profile of user servername to set the environment when he logs in. User servername can go directly into the $INSTALL_DIR/bin location and start the server.

4. Give these folder permissions to user servername:

chmod 775 $INSTALL_DIR/bin
chmod 775 $INSTALL_DIR/java
chmod 775 $INSTALL_DIR/properties"
chmod 775 $INSTALL_DIR/deploytool"
chmod 775 $INSTALL_DIR/config
chmod 775 $INSTALL_DIR/lib
chmod 775 $INSTALL_DIR/classes
chmod 775 $INSTALL_DIR/null
chmod 775 $INSTALL_DIR/samples
chmod 775 $INSTALL_DIR/Web

 

Example of deleting a instance

The following command deletes the instance named servername:

wsinstance.sh -name servername -host venus -delete

 


 

 

 

Home

 

 

 

 

Posted By: Michael Pareene
Last Update: Michael Pareene

Confidential: Foo Corporation.
Copyright 2002. All Rights Reserved.

 

WebSphere is a trademark of the IBM Corporation in the United States, other countries, or both.

 

IBM is a trademark of the IBM Corporation in the United States, other countries, or both.