【转帖】 Linux下Weblogic集群配置_Tomcat, WebLogic及J2EE讨论区_Weblogic技术|Tuxedo技术|中间件技术|Oracle论坛|JAVA论坛|Linux/Unix技术|hadoop论坛_联动北方技术论坛  
网站首页 | 关于我们 | 服务中心 | 经验交流 | 公司荣誉 | 成功案例 | 合作伙伴 | 联系我们 |
联动北方-国内领先的云技术服务提供商
»  游客             当前位置:  论坛首页 »  自由讨论区 »  Tomcat, WebLogic及J2EE讨论区 »
总帖数
1
每页帖数
101/1页1
返回列表
0
发起投票  发起投票 发新帖子
查看: 3547 | 回复: 0   主题: 【转帖】 Linux下Weblogic集群配置        下一篇 
红与黑
注册用户
等级:上尉
经验:644
发帖:51
精华:1
注册:2013-2-25
状态:离线
发送短消息息给红与黑 加好友    发送短消息息给红与黑 发消息
发表于: IP:您无权察看 2013-2-28 16:30:56 | [全部帖] [楼主帖] 楼主

Chinaitlab收集整理

域,集群,管理
服务器
和被管
服务器
之间的关系
Weblogic域是一个服务器/集群的管理组,用户可以通过某个中央位置来管理、监控整个服务器域,这个中心就是管理服务器,相对的,受控服务器或者叫被管服务器是指域中除了管理服务器以外的所有的服务器。
Weblogic集群是一个weblogic Server组,在一个集群中的服务器可以获得集群范围的命名服务、负载平衡以及容错等功能。
所以,一个weblogic域可以同时管理多个集群以及多个服务器实例。
另外,还有一个节点管理器的概念,节点管理器是指在物理的机器上运行的一个守护进程,通过它,管理服务器可以获得诸如在控制台中强制重启远程机器上的server等功能(没有节点管理器的情况下也是可以强制关闭远程服务器的,但是不能重启)。
除此之外,据说节点管理器还可以自动检查自己机器上的server实例(健康检查),当发现某个实例出现故障的时候,可以自动进行重启,这个没试过。
注意事项
1. 本文的weblogic均配置在

linux


环境下
2. 集群中管理服务器和被管服务器之间有用到ip组播UDP,所以这些服务器之间必须是UDP可以到达的。
3. 好像动态ip的机器不能用于集群当中
4. 最佳实践说:请不要把管理服务器设置在集群当中
5. 本文所配置的集群只是实现了web层次上的负载平衡和容错,也就是servlet和jsp,其他的j2ee组件如ejb,jdbc,jms等都可以集群化。
本例测试域的规划

Ip/port
server


注释

10.21.18.40:7001
adminServer


管理服务器

10.21.18.40:7003
mServer1


被管服务器1

10.21.18.41:7001
mServer2


被管服务器2

10.21.18.40:7004
proxyServer


代理服务器

配置过程
建立管理服务器
启动

linux


下的配置向导
进入bea目录下的weblogic81/common/bin目录输入./config.sh,这里使用的终端登陆,所以没有图形环境,程序会以控制台模式启动
第一步:选择建立新的域:
启动配置向导后,系统提示如下:

Create or Extend a Configuration:
---------------------------------
Choose between creating and extending a configuration. Based on your selection, the Configuration Wizard guides you through
the steps to generate a new or extend an existing configuration.
->1|Create a new WebLogic configuration
| Start here to create a WebLogic configuration in your projects directory.
2|Extend an existing WebLogic configuration
| Start here to extend an existing WebLogic configuration. Use this option to add applications and services,
|including Database access (JDBC) and Messaging (JMS). This option also enables you to extend functionality by enabling
|WebLogic Workshop.
Enter index number to select OR [Exit][Next]> 1


录入1回车,建立一个新的域。
第二步:选择模版
系统提示选择一个建立域的模版,资料上讲配置向导的配置过程可以另存为模版,以便下次配置的时候使用,没试过下次回去试试。

Select a Domain Template:
-------------------------
Please select a template from the list or select another directory of templates.
* [/usr/local/bea/weblogic81/common/templates/domains]
->1|Basic WebLogic Server Domain 8.1.4.0
| BEA Systems, Inc.
| Create a basic WebLogic Server domain without installing sample applications.
2|WebLogic Server Examples Domain 8.1.4.0
| BEA Systems, Inc.
| Create the WebLogic Server Examples domain in a directory outside of the installed kit. The Examples domain contains |a collection of examples to show best practices for coding individual J2EE APIs.
3|Avitek Medical Records Sample Domain 8.1.4.0
| BEA Systems, Inc.
| Create the Avitek Medical Records domain in a directory outside of the installed kit. The Avitek Medical Records is
|a WebLogic Server sample application suite that concisely demonstrates all aspects of the J2EE platform.
4|Select another directory location
Enter index number to select OR [Exit][Previous][Next]> 1


这里我们选择1,使用基础的模版
第三步:是否以快速模式进行
第三步系统提示是否以快速模式进行配置,这里选择2。

Choose Configuration Option:
----------------------------
*Do you want to run the wizard in express mode?
->1|Yes
2|No
Enter index number to select OR [Exit][Previous][Next]> 2


第四步:配置管理服务器
现在系统提示我们配置管理服务器,把管理服务器的名字改一下,改成adminServer就可以了。

Configure the Administration Server:
------------------------------------
Enter adminstration server configurations. Each WebLogic Server domain must have one Administration Server. The
Administration Server hosts the Administration Console which is used to perform administrative tasks.
| Name | Value |
_|__________________|_____________________|
1| *Name: | myserver |
2| Listen address: | All Local Addresses |
3| Listen port: | 7001 |
4| SSL listen port: | N/A |
5| SSL enabled: | false |
Select Option:
1 - Modify "Name"
2 - Modify "Listen address"
3 - Modify "Listen port"
4 - Modify "SSL enabled"
Enter option number to select OR [Exit][Previous][Next]> 1


输入1之后,根据系统提示输入新的管理服务器的名称adminServer
第五步:配置被管服务器
根据下面系统的提示,配置被管服务器

Configure Managed Servers:
--------------------------
Add or delete configuration information for managed servers. A typical production environment has one or more managed
servers. Each managed server is an instance of WebLogic Server used to host enterprise applications.
| Name* | Listen address | Listen port | SSL listen port | SSL enabled |
_|_______|________________|_____________|_________________|_____________|
Enter name for a new Server OR [Exit][Previous][Next]> mServer1


被管服务器我们设置两个:mServer1和mServer2,mServer1和管理服务器在一台机器上,所以端口设置为7003避免和管理服务器冲突。
mServer2的监听地址一定要设置成ip,否则在启动被管服务器2的时候会得到这样一个错误:using the same address as the admin server(这个错挺傻的我觉得),如果是实际的集群配置的话,这里建议都写成ip的形式。
配置完成的画面如下:

| Name* | Listen address | Listen port | SSL listen port | SSL enabled |
_|_________|___________________|_____________|_________________|_____________|
1| mServer1| 10.21.18.41 | 7003 | N/A | false |
->2|mServer2|10.21.18.41 | 7001 | N/A | false |


第六步:配置集群

Configure Clusters:
-------------------
A cluster contains multiple WebLogic Server instances (servers) that run simultaneously and work together to provide
increased scalability and reliability. A cluster appears to be a single WebLogic Server instance to clients.
| Name* | Multicast address | Multicast port | Cluster address |
_|_______|___________________|________________|_________________|
Enter name for a new Cluster OR [Exit][Previous][Next]> testCluster


输入集群的名字testCluster,其他的默认就行了,配置完成后如下:

| Name* | Multicast address | Multicast port | Cluster address |
_|_____________|___________________|________________|_________________|
->1| testCluster | 237.0.0.1 | 7001 | |


第七步:将服务器组织到集群中
根据系统的提示,将mServer1和mServer2放入集群testCluster中去,配置完成后如下:

Cluster
|_____testCluster [1]
|_____mServer1
|_____mServer2


第八步:配置机器、jdbc、jms、
安全

接下来几步系统提示配置Machines,jdbc,jms,
安全
,这里都不用配置,全部回车就行了。
第九步:输入管理服务器的用户名和密码
系统提示如下画面,可以配置管理服务器的用户名和密码:

| Name | Value |
_|_________________________|_________________________________|
1| *User name: | weblogic |
2| *User password: | |
3| *Confirm user password: | |
4| Description: | The default administration user |


第十步:选择启动模式,jdk和存放目录




赞(0)    操作        顶端 
总帖数
1
每页帖数
101/1页1
返回列表
发新帖子
请输入验证码: 点击刷新验证码
您需要登录后才可以回帖 登录 | 注册
技术讨论