Network Deployment (Distributed operating systems), v8.0 > Scripting the application serving environment (wsadmin) > Configure servers with scripting
Create a server using scripting
Overview
Use the commands in the ServerManagement command group or the AdminServerManagement script library to create a new application server, web server, proxy server, or generic server.
There are three ways to complete this task. This topic uses the AdminConfig object and the commands 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 wsadmin.sh.
- Obtain the configuration ID of the node object.
### Jacl
set node [$AdminConfig getid /Node:node_name/]
### Jython
node = AdminConfig.getid('/Node:node_name/')
To display the configuration ID of the node object...
print node
- Create the server.
- Using AdminTask...
### Jacl
$AdminTask createApplicationServer node_name {-name server_name
–templateName template_name}
### Jython
AdminTask.createApplicationServer('node_name', ['-name', 'server_name
, '-templateName', 'template_name'])
- Using AdminConfig
### Jacl
$AdminConfig create Server $node {{name server_name
}
### Jython
AdminConfig.create('Server', node, ['name', 'server_name
])
- Save the configuration changes.
AdminConfig.save()
- Synchronize the node.
Using syncActiveNodes...
AdminNodeManagement.syncActiveNodes()
Using syncNode
AdminNodeManagement.syncNode("myNode")
Synchronize nodes using wsadmin.sh
Create application servers using the administrative console
Create generic servers
Create proxy servers
Use the wsadmin scripting AdminConfig object for scripted administration
Related
Server configuration scripts
Server settings configuration scripts
Commands for the AdminConfig object using wsadmin.sh