How To Create Managed Server In Weblogic
Create a WebLogic Server using WLST
In the previous blog we have seen how to Install and create Admin server . Now we will see how to create managed server ,start and stop .
run setWLSEnv.sh to load Weblogic Environment variables .
cd /apps/bea14/wlserver/server/bin [wlsuser@localhost bin]$ ./setWLSEnv.sh CLASSPATH=/apps/java11_64/lib/tools.jar:/apps/bea14/wlserver/modules/features/wlst.wls.classpath.jar: PATH=/apps/bea14/wlserver/server/bin:/apps/bea14/wlserver/../oracle_common/modules/thirdparty/org.apache.ant/1.10.5.0.0/apache-ant-1.10.5/bin:/apps/java11_64/bin:/apps/java11_64/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin:/home/wlsuser/.local/bin:/home/wlsuser/bin:/apps/bea14/wlserver/../oracle_common/modules/thirdparty/apache-maven_bundle/3.6.1.0.0/apache-maven-3.6.1/bin Your environment has been set. [wlsuser@localhost bin]$
Now run wlst.sh then run below commands to create managed server
[wlsuser@localhost wlserver]$ cd common/bin/ [wlsuser@localhost bin]$ ./wlst.sh WARNING: This is a deprecated script. Please invoke the wlst.sh script under oracle_common/common/bin. Initializing WebLogic Scripting Tool (WLST) ... Welcome to WebLogic Server Administration Scripting Shell Type help() for help on available commands wls:/offline> <<<<<<<Here run below commands to create AppSrv01>>>>> readTemplate('/apps/bea14/wlserver/common/templates/wls/wls.jar') connect('weblogic','welcome1', 't3://localhost:7001') edit() startEdit() cd('/') cmo.createServer('AppSrv01') cd('/Servers/' + 'AppSrv01') set('ListenAddress','127.0.0.1') set('ListenPort', 7003) save() activate() disconnect() exit()
To Start the managed server for the first time we need to create boot.properties file which holds admin id and password details . either we can create new file or copy from Admin security .
[wlsuser@localhost TESTDomain]$ cd servers/ [wlsuser@localhost servers]$ ls -lrt total 0 drwxr-xr-x. 7 wlsuser wlsuser 70 Dec 24 23:35 AdminServer drwxr-x---. 3 wlsuser wlsuser 25 Dec 25 10:58 domain_bak [wlsuser@localhost servers]$ mkdir AppSrv01 [wlsuser@localhost servers]$ cd AppSrv01/ [wlsuser@localhost AppSrv01]$ cp ../AdminServer/security/ . cp: omitting directory '../AdminServer/security/' [wlsuser@localhost AppSrv01]$ cp -R ../AdminServer/security/ . [wlsuser@localhost AppSrv01]$ cd security/ [wlsuser@localhost security]$ ls -lrt total 4 -rwxr-xr-x. 1 wlsuser wlsuser 192 Dec 25 11:07 boot.properties [wlsuser@localhost security]$
Start Managed Weblogic server
nohup ./startManagedWebLogic.sh AppSrv01 t3://127.0.0.1:7001 &
[wlsuser@localhost TESTDomain]$ cd bin [wlsuser@localhost bin]$ nohup ./startManagedWebLogic.sh AppSrv01 t3://127.0.0.1:7001 & [4] 4997 nohup: ignoring input and appending output to 'nohup.out' [wlsuser@localhost bin]$ <Dec 25, 2020, 11:13:10,543 AM Singapore Standard Time> <Notice> <Server> <BEA-002613> <Channel "Default" is now listening on 127.0.0.1:7003 for protocols iiop, t3, ldap, snmp, http.> <Dec 25, 2020, 11:13:10,576 AM Singapore Standard Time> <Notice> <Server> <BEA-002613> <Channel "Default" is now listening on 127.0.0.1:7003 for protocols iiop, t3, ldap, snmp, http.> <Dec 25, 2020, 11:13:10,666 AM Singapore Standard Time> <Notice> <JMX> <BEA-149535> <JMX Resiliency Activity Server=AppSrv01 : Received a CONNECT EVENT > <Dec 25, 2020, 11:13:10,668 AM Singapore Standard Time> <Notice> <JMX> <BEA-149535> <JMX Resiliency Activity Server=AppSrv01 : Starting JMX connection. forceReconnect value: false> <Dec 25, 2020, 11:13:10,693 AM Singapore Standard Time> <Notice> <WebLogicServer> <BEA-000360> <The server started in RUNNING mode.> <Dec 25, 2020, 11:13:10,715 AM Singapore Standard Time> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to RUNNING.>
Stopping managed server
./stopManagedWebLogic.sh AppSrv01 t3://127.0.0.1:7001
[wlsuser@localhost bin]$ ./stopManagedWebLogic.sh AppSrv01 t3://127.0.0.1:7001 Stopping Weblogic Server... Initializing WebLogic Scripting Tool (WLST) ... Welcome to WebLogic Server Administration Scripting Shell Type help() for help on available commands Connecting to t3://127.0.0.1:7001 with userid weblogic ... Successfully connected to Admin Server "AdminServer" that belongs to domain "TESTDomain". Warning: An insecure protocol was used to connect to the server. To ensure on-the-wire security, the SSL port or Admin port should be used instead. Shutting down the server AppSrv01 with force=false while connected to AdminServer ... . Exiting WebLogic Scripting Tool. Done Stopping Derby Server... Derby server stopped. [4] Done nohup ./startManagedWebLogic.sh AppSrv01 t3://127.0.0.1:7001 [wlsuser@localhost bin]$
With SSL port enabled log looks like below .
<Dec 25, 2020, 11:21:17,495 AM Singapore Standard Time> <Notice> <WebLogicServer> <BEA-000332> <Started the WebLogic Server Managed Server "AppSrv01" for domain "TESTDomain" running in development mode.> <Dec 25, 2020, 11:21:17,496 AM Singapore Standard Time> <Notice> <Server> <BEA-002613> <Channel "DefaultSecure" is now listening on 127.0.0.1:7004 for protocols iiops, t3s, ldaps, https.> <Dec 25, 2020, 11:21:17,496 AM Singapore Standard Time> <Notice> <Server> <BEA-002613> <Channel "Default" is now listening on 127.0.0.1:7003 for protocols iiop, t3, ldap, snmp, http.> <Dec 25, 2020, 11:21:17,497 AM Singapore Standard Time> <Notice> <Server> <BEA-002613> <Channel "DefaultSecure" is now listening on 127.0.0.1:7004 for protocols iiops, t3s, ldaps, https.>
so far default SSL cert was used comes with Weblogic Demo Identity and Demo Trust keystore .To use Custom Keystore We need to configure under SSL and Keystore on each server in weblogic .
How to configure Custom Identity and Custom Trust store in Weblogic – Ask Middleware Expert
How To Create Managed Server In Weblogic
Source: https://askmiddlewareexpert.com/create-a-weblogic-server-using-wlst/
Posted by: sainanderser.blogspot.com
0 Response to "How To Create Managed Server In Weblogic"
Post a Comment