基于脚本的nodemanager管理器

Step 6: Configure Node Manager on the Managed Servers虚拟机环境:

管理服务器IP:192.168.227.10  AdminServer

受管服务器IP:192.168.227.20  ms2

1、用root用户登录设定需要的用户名以及组

> groupadd bea
> useradd -g bea -m bea
> passwd bea
> useradd -g bea -m ndmgr
> passwd ndmgr

2、配置ssh密钥登录(略)

3、安装> ./ wlserver_103_linux32.bin

4、以下以ndmgr用户执行:

Run the Configuration Wizard:

> /opt/bea/wlserver_103/common/bin/config.sh
Create a new WebLogic domain based on the default WebLogic Server template.
For the Administration Server, specify a fixed IP address (for example, 192.168.227.10).
In Customize Environment and Service Settings, select Yes.
In Configure Managed Servers, add two Managed Servers, MS1 and MS2.
For the Managed Servers, specify floating IP addresses (for example, 192.168.227.10 and 192.168.227.20).
In Configure Clusters, add a cluster, CLUST, and then assign MS1 and MS2 to it.
Do not specify any Machines or UNIX Machines; you will do this manually in a subsequent step.
Name the domain clustdomain and save it to /opt/bea/clustdomain

Step 5: Start the Administration Server

> /opt/bea/wlserver_103/common/bin/wlscontrol.sh -d clustdomain -r
/opt/bea/clustdomain -c -f startWebLogic.sh -s AdminServer START

如果启动成功,关闭AminServer,然后登录227.20机器,远程启动

> ssh -l ndmgr -o PasswordAuthentication=no -p  192.168.227.10
/opt/bea/wlserver_
/common/bin/wlscontrol.sh -d clustdomain -r /home/ndmgr/clustdomain -c -f
startWebLogic.sh -s AdminServer START

Step 6: Configure Node Manager on the Managed Servers

Each machine that will host a Managed Server will have a skeleton domain created and configured.

>mkidr clustdomain
>cd clustdomain;pwd
>/home/ndmgr/clustdomain > opt/bea/wlserver_103/common/bin/wlst.sh
> connect('weblogic','weblogic','t3://192.168.227.10:7001')
> nmEnroll('/home/ndmgr/clustdomain','/home/ndmgr')
// 下载nm_password.properties 文件包含节点管理器的用户名和密码。用它们来验证客户端(例如,管理服务器)与节点管理器之间的连接。
//参考路径: /home/weblogic/Oracle/Middleware/user_projects/domains/clust_domain/config/nodemanager/nm_password.properties
//下载密钥文件 /home/weblogic/Oracle/Middleware/user_projects/domains/clust_domain/security/SerializedSystemIni.dat
> exit()

Step 7: Test Node Manager Setup and Configuration by Starting Managed Servers

把管理服务器域下面bin文件中的bash文件拷贝到受管服务器域主目录下面的bin文件夹内

  1. Edit the DOMAIN_HOME and LONG_DOMAIN_HOME variables in the setDomainEnv.sh script to correctly reflect this remote domain home directory: DOMAIN_HOME=/home/ndmgr/clustdomain
  2. LONG_DOMAIN_HOME=/home/ndmgr/clustdomain
  3. Similarly, edit the DOMAIN_HOME variable in startWebLogic.sh
  4. Edit the DOMAIN_HOME and ADMIN_URL (for example, t3://192.168.1.100:7001) variables in startManagedWebLogic.sh)

For each of the Managed Server host machines (including the back-up machine), as the ndmgr user, create a server/security subdirectory in the domain directory.
For example, for the Managed Server MS1:
> mkdir -p ~/clustdomain/servers/MS1/security

Create a new boot.properties file with the appropriate username and password variables specified in each Managed Server's security directory (for example, /home/ndmgr/clustdomain/servers/MS1/security).
For example:
username=weblogic
password=welcome1

本地和远程测试:

> opt/bea/wlserver_103/common/bin/wlscontrol.sh -d clustdomain -n /home/ndmgr -c -f startManagedWebLogic.sh -s MS1 START

> ssh -l ndmgr -o PasswordAuthentication=no -p 22 192.168.1.101 /opt/bea/wlserver_103/common/bin/wlscontrol.sh -d clustdomain -n /home/ndmgr -c -f startManagedWebLogic.sh -s MS1 START

Step 8: Configure UNIX Machines

Property Value
O.S. Type UNIX
Node Manager Type SSH
Node Manager Listen Address 192.168.227.20
Node Manager Listen Port 22
Node Manager Home /home/ndmgr
Node Manager Shell Command ssh -l ndmgr -o PasswordAuthentication=no -p %P %H
/opt/bea/wlserver_103/common/bin/wlscontrol.sh -d %D
-n /home/ndmgr -c -f startManagedWebLogic.sh -s %S %C
Node Manager Debug Enabled true  
Servers ms2
上一篇:[LeetCode] Expressive Words 富于表现力的单词


下一篇:MySQL 5.7.11 重置root密码