Configuring Managed Servers

 

<< Previous

Configure managed servers using the Administrative Console

Configure managed servers using WebLogic Scripting Tool (WLST)

* Create Managed Server named MyMSvr2

 
connect('weblogic','welcome1','t3://localhost:7001')
 
cd('Servers')
edit()
startEdit()
server1=create('MyMSvr2','Server')
ls('Servers')
 
save()
activate()
stopEdit()
exit()

* Modify listen port:

connect('weblogic','welcome1','t3://localhost:7001')
 
edit()
startEdit()
 
cd('Servers')
ls()
 
cd('MyMSvr2')
set('ListenPort',9001)
save()
activate()
exit()

* Create more than one managed servers

servers = {'serverB':7021,'serverC':7031}
connect('myAdminuser','Welcome1','localhost:7001')
edit()
startEdit()
 
for name, port in servers.items():
  cd('/Servers')
  create(name,'Server')
  cd(name)
  set('ListenPort',port)
 
save()
activate()
disconnect()
exit()

Start managed servers

* Use shell script: startManagedWebLogic.sh
* Use weblogic.Server
* Use WLST and node manager
* Use Admin Console
– Requires Node Manager on each machine
– Requires additional configurations:
~ username and password
~ listen ports
~ CLASSPATH, JAVA_PATH
~ SSL or not
* Create a boot.properties file to avoid prompting for boot password

/labs/wls1035/wlserver_10.3/samples/domains/wl_server/servers/MyMSvr1/security
[oracle@wlbox security]$ ls
boot.properties

Use startManagedWebLogic.sh

* Command:
DOMAIN_NAME/bin/startManagedWebLogic.sh managed_server_name [admin_url]
* Example:

cd /labs/wls1035/wlserver_10.3/samples/domains/wl_server/bin
./startManagedWebLogic.sh MyMSvr2 http://wlbox:7001

Use weblogic.Server

* Command:

java
-Dweblogic.Name=managed_server_name
-Dweblogic.management.server=url_Admin_Server
weblogic.Server

* Example:

cd $WL_HOME/server/bin
. ./setWLSEnv.sh
 
java -Dweblogic.Name=MyMSvr1 -Dweblogic.management.server=http://localhost:7001  weblogic.Server

Shut down servers using WLST or the Administrative Console

* Use AdminConsole
* Use stopManagedServer.sh script

cd $DOMAIN_NAME/bin
./stopManagedWebLogic.sh MyMSvr1

* WLST

connect('weblogic','welcome1','t3://localhost:7001')
cd('Servers')
ls()
shutdown('MyMSvr1')
exit()

Monitor Servers from Admin Console

Monitor All Servers

* Customize views

Monitor Individual Server

Create managed servers on a remote machine with pack and unpack

* Install WLS on both machines
* Create domain on the Admin Server
* Start Admin Server
* Create Managed Server using Admin Console

* Create Managed Server template using pack

cd $WL_HOME/common/bin
./pack.sh -managed=true \
-domain=/labs/wls1035/wlserver_10.3/samples/domains/wl_server \
-template=/home/oracle/rmtTmpl/MyRmtSvr1_managed.jar \
-template_name="My Remote Managed Server 1"

* Create Managed Server on the remote machine using unpack

cd $WL_HOME/common/bin
./unpack.sh \
-domain=/labs/wls1035/user_projects/domains/myMSvr1 \
-template=/home/oracle/rmtTmpl/MyRmtSvr1_managed.jar

* Start remote Managed Server

cd /labs/wls1035/user_projects/domains/myMSvr1/bin
./startMyRmtSvr1.sh

* You may need to adjust JVM memory settings in the commEnv.sh script in $WL_HOME/common/bin directory to avoid out of memory error:

  case $JAVA_VENDOR in
  Oracle)
    JAVA_VM=-jrockit
    #MEM_ARGS="-Xms128m -Xmx256m"
    MEM_ARGS="-Xms768m -Xmx1024m"
    JAVA_OPTIONS="${JAVA_OPTIONS} -Xverify:none"
  ;;

Define Managed Server Independence mode

Overview

* By default, managed servers can function without admin server
* A managed server can start in MSI mode when admin server is not available
* Can not change configuration of managed servers running in MSI mode since Admin Server is not available
* MSI mode can be configured from admin console (default to enabled)

* Need config subdirectory in managed server root directory in order to start in MSI mode

Create and use a boot.properties file

* Create in directory: DOMAIN_NAME/servers//security
* Contains two lines:
username=username
password=password
* Server overwrite it with encrypted values the first time it starts

Next >>

[mv_include id=’3268′]

This entry was posted in weblogic11g and tagged , , , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *


*

This site uses Akismet to reduce spam. Learn how your comment data is processed.