Step:1 Stop the Node Manager
F:\OHS\user_projects\domains\base_domain\bin>stopNodeManager.cmd Stopping System Component ohs1 ...
Step:2 Invoke WLST offline
F:\OHS\oracle_common\common\bin>wlst.cmd
Initializing WebLogic Scripting Tool (WLST) ...
Welcome to WebLogic Server Administration Scripting Shell
Type help() for help on available commands
wls:/offline>
Step:3 Create Second OHS Instance Throgh WLST
F:\OHS\oracle_common\common\bin>wlst.cmd
Initializing WebLogic Scripting Tool (WLST) ...
Welcome to WebLogic Server Administration Scripting Shell
Type help() for help on available commands
wls:/offline> readDomain('F:/OHS/user_projects/domains/base_domain')
wls:/offline/base_domain>cd('/')
wls:/offline/base_domain>create('ohs2', 'SystemComponent')
Proxy for ohs2: Name=ohs2, Type=SystemComponent
wls:/offline/base_domain>cd('/SystemComponent/ohs2')
wls:/offline/base_domain/SystemComponent/ohs2>cmo.setComponentType('OHS')
wls:/offline/base_domain/SystemComponent/ohs2>set('Machine', 'localmachine')
wls:/offline/base_domain/SystemComponent/ohs2>cd('/OHS/ohs2')
wls:/offline/base_domain/OHS/ohs2>cmo.setAdminHost('127.0.0.1')
wls:/offline/base_domain/OHS/ohs2>cmo.setAdminPort('5000')
wls:/offline/base_domain/OHS/ohs2>cmo.setListenAddress('localhost')
wls:/offline/base_domain/OHS/ohs2>cmo.setListenPort('7778')
wls:/offline/base_domain/OHS/ohs2>cmo.setSSLListenPort('4444')
wls:/offline/base_domain/OHS/ohs2>cmo.setServerName('http://localhost:7778')
wls:/offline/base_domain/OHS/ohs2>updateDomain()
wls:/offline/base_domain/OHS/ohs2>exit()
Exiting WebLogic Scripting Tool.
Note:
Admin Host: The listen address to use for the selected OHS server for communication with Node Manager. The address should only allow loopback communication within the host (for example, 127.0.0.1).
Admin Port: The listen port to use for the selected OHS server for communication with Node Manager on this system. The port must be unique.
Step:4 Start The Nodemanager
F:\OHS\user_projects\domains\base_domain\bin>startNodeManager.cmd
NODEMGR_HOME is already set to F:\OHS\USER_P~1\domains\BASE_D~1\NODEMA~1
CLASSPATH=.;F:\OHS\ORACLE~1\jdk\jre\lib\tools.jar;F:\OHS\wlserver\server\l
Step:5 Now start the both Ohs Instances
F:\OHS\user_projects\domains\base_domain\bin>startComponent.cmd ohs1
Starting system Component ohs1 ...
Initializing WebLogic Scripting Tool (WLST) ...
Welcome to WebLogic Server Administration Scripting Shell
Type help() for help on available commands
Reading domain from F:/OHS/user_projects/domains/base_domain
Please enter Node Manager password:
Connecting to Node Manager ...
Successfully Connected to Node Manager.
Starting server ohs1 ...
Successfully started server ohs1 ...
Successfully disconnected from Node Manager.
Exiting WebLogic Scripting Tool.
Done
Step:7 Now start second ohs instance
F:\OHS\user_projects\domains\base_domain\bin>startComponent.cmd ohs2
Starting system Component ohs2 ...
Initializing WebLogic Scripting Tool (WLST) ...
Welcome to WebLogic Server Administration Scripting Shell
Type help() for help on available commands
Reading domain from F:/OHS/user_projects/domains/base_domain
Please enter Node Manager password:
Connecting to Node Manager ...
Successfully Connected to Node Manager.
Starting server ohs2 ...
Successfully started server ohs2 ...
Successfully disconnected from Node Manager.
Exiting WebLogic Scripting Tool.
Done
============================
Screenshot for reference
ReplyDeleteThanks for the script. Can you please provide me script for creation of OHS domain and single instance with custom name.