本文通过weblogic的console控制台添加被管服务器。
1、登录console
依次展开 环境-服务器,单击 锁定并编辑,右侧 新建,输入服务器名称和服务器端口号,下一步,完成,最后 锁定编辑
创建完成后效果:
2、启动被管服务器
进入域主目录下的bin目录下,执行startManagedWebLogic.sh脚本
./startManagedWebLogic.sh + 被管服务器名称 + http://ip:7001
[weblogic@localhost base_domain]$ pwd
/home/weblogic/Oracle/Middleware/user_projects/domains/base_domain
[weblogic@localhost base_domain]$ cd bin/
[weblogic@localhost bin]$ ll
total 36
drwxr-x---. 2 weblogic weblogic 27 Aug 24 14:17 nodemanager
drwxr-x---. 2 weblogic weblogic 28 Aug 24 14:17 server_migration
drwxr-x---. 2 weblogic weblogic 24 Aug 24 14:17 service_migration
-rwxr-x---. 1 weblogic weblogic 13250 Aug 24 14:17 setDomainEnv.sh
-rwxr-x---. 1 weblogic weblogic 3229 Aug 24 14:17 startManagedWebLogic.sh
-rwxr-x---. 1 weblogic weblogic 5699 Aug 24 14:17 startWebLogic.sh
-rwxr-x---. 1 weblogic weblogic 2450 Aug 24 14:17 stopManagedWebLogic.sh
-rwxr-x---. 1 weblogic weblogic 1992 Aug 24 14:17 stopWebLogic.sh
[weblogic@localhost bin]$ ./startManagedWebLogic.sh test1 http://192.168.78.129:7001
console控制台查看启动状态
3、停止被管服务器
进入域主目录下的bin目录下,执行stopManagedWebLogic.sh脚本
./stopManagedWebLogic.sh 被管服务器名 t3://IP:7001 用户名 密码 force=true # force=true表示强制停止
[weblogic@localhost bin]$ ./stopManagedWebLogic.sh test1 t3://192.168.78.129:7001 weblogic 00000000 force=true
Stopping Weblogic Server...
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=256m; support was removed in 8.0
Initializing WebLogic Scripting Tool (WLST) ...
Welcome to WebLogic Server Administration Scripting Shell
Type help() for help on available commands
Connecting to t3://192.168.78.129:7001 with userid weblogic ...
Successfully connected to Admin Server 'AdminServer' that belongs to domain 'base_domain'.
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 test1 with force=false while connected to AdminServer ...
.
Exiting WebLogic Scripting Tool.
Done
Stopping Derby Server...
4、后台运行被管服务器
nohup ./startManagedWebLogic.sh test1 http://192.168.78.129:7001 &
1 [weblogic@localhost bin]$ nohup ./startManagedWebLogic.sh test1 http://192.168.78.129:7001 &
2 [1] 6264
3 [weblogic@localhost bin]$ nohup: ignoring input and appending output to ‘nohup.out’
5、免密启动被管服务器
进入被管服务器目录/home/weblogic/Oracle/Middleware/user_projects/domains/base_domain/servers/test2,依test2服务器为例。
[weblogic@localhost test2]$ pwd
/home/weblogic/Oracle/Middleware/user_projects/domains/base_domain/servers/test2
[weblogic@localhost test2]$ mkdir security
[weblogic@localhost test2]$ vim security/boot.properties
username=weblogic
password=00000000
最后执行启动脚本。