Use the commands in the ServerManagement command group
for the AdminTask object or the AdminServerManagement script library
to create a new application server, Web server, proxy server, or generic
server.
Before you begin
There are three ways to complete this task. This topic
uses the AdminConfig object and the commands for the AdminTask object
to create a new server configuration. Alternatively, you can use the
scripts in the AdminServerManagement script library to create an application
server, Web server, proxy server, or generic server.
Procedure
- Start the wsadmin scripting tool.
- Obtain the configuration ID of the node object.
The following examples obtain the configuration ID of
the node object and assigns it to the node variable. In these
examples, myNode is the name of the node to which
you are adding the new server, myserv is the name
of the server you are creating, and node is a node object. The AdminTask.createApplicationServer()
command requires you to specify a node name and the node name needs
to be enclosed with quotes. The AdminConfig.create() command requires
you to specify a node object, which you issue the AdminConfig.getid('/Node:mynode/')
command to obtain. ![[oct2010]](../../deltaend.gif)
oct2010
- Determine whether to use the AdminConfig or AdminTask object
to create the server.
- Create the server.
- The following example uses the commands for the AdminTask
object to create a server:
Using the AdminTask object:
Using Jacl:
$AdminTask createApplicationServer mynode
{-name test1 –templateName default}
Using Jython:
AdminTask.createApplicationServer('mynode',
['-name', 'test1', '-templateName', 'default'])
![[oct2010]](../../deltaend.gif)
oct2010
- The following example uses the AdminConfig object to create
a server:
Using the AdminConfig object:
Using Jacl:
$AdminConfig create Server $node {name myserv}
![[oct2010]](../../deltaend.gif)
oct2010
Using Jython:
AdminConfig.create('Server', node, ['name', 'myserv']
![[oct2010]](../../deltaend.gif)
oct2010
- Save the configuration changes.
Use the following command example to save your configuration
changes:
AdminConfig.save()
- In a network deployment
environment only, synchronize the node.
Use the syncActiveNode or syncNode scripts in the
AdminNodeManagement script library to propagate the configuration
changes to node or nodes.