设为首页 收藏本站
查看: 801|回复: 0

[经验分享] 另一篇 Linux下Weblogic集群配置 zz

[复制链接]

尚未签到

发表于 2016-3-17 13:49:35 | 显示全部楼层 |阅读模式
  Linux下Weblogic集群配置(1)
 
作者:zjyhh    文章来源:网上收集    点击数:787    更新时间:2007-3-10           
 
 
 
域,集群,管理服务器和被管服务器之间的关系
       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,这里使用的终端登陆,所以没有图形环境,程序会以控制台模式启动
  第一步:选择建立新的域:
  启动配置向导后,系统提示如下:
  <------- BEA WebLogic Configuration Wizard---------->
  
  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回车,建立一个新的域。
  第二步:选择模版
  系统提示选择一个建立域的模版,资料上讲配置向导的配置过程可以另存为模版,以便下次配置的时候使用,没试过下次回去试试。
  <-------- BEA WebLogic Configuration Wizard -------->
  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。
  <--------- BEA WebLogic Configuration Wizard ----------->
  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就可以了。
  <------- BEA WebLogic Configuration Wizard -------->
  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
  第五步:配置被管服务器
  根据下面系统的提示,配置被管服务器
  <--------- BEA WebLogic Configuration Wizard ---------->
  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|
->2|mServer2|10.21.18.41       |   7001     |       N/A       |    false    |
  
  第六步:配置集群
  <----BEA WebLogic Configuration Wizard ------>
  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和存放目录
  
  
 
  启动模式,jdk和域文件存放目录的设置比较简单,根据大家的爱好设置就行了。
  这里启动模式选择生产开发模式,jdk使用jRockit,存放目录默认。
  十一步:配置域名称
  Edit Domain Information:
  ------------------------
  |  Name  |  Value   |
  _|________|__________|
  1| *Name: | mydomain |
  Enter value for "Name" OR [Exit][Previous][Next]> testDomain
  设置域的名称为testDomain。
  十二步:域建立结束
  以上步骤都完成后,系统会自动建立这个域,并会生成一些文件等等,完成的界面如下:
  <----- BEA WebLogic Configuration Wizard --------->
  Creating Domain...
  0%          25%          50%          75%          100%
  [------------|------------|------------|------------]
  [***************************************************]
  **** Domain Created Successfully! ****
  启动管理服务器
  进入bea/user_projects/domains/testDomain/目录
键入./startWebLogic.sh
 将这个应用打包成war文件,上传到管理服务器上,然后部署在proxyServer上面。
  部署成功后的页面:
  测试
  打开一个浏览器,在其中输入:
  http://10.21.18.40:7004/abc.jsp? __WebLogicBridgeConfig
  jsp的名字随便输入可以了,如果看到如下页面,就说明配置成功了:
  然后再做一个web应用,里面放两个servlet,jsp啥的,部署在集群上面,比如说部署成功了以后应用叫做testApp,其中有一个页面叫index.jsp
  键入如下的地址:
  http://10.21.18.41:7001/testApp/index.jsp
  http://10.21.18.40:7003/testApp/index.jsp
  http://10.21.18.40:7004/testApp/index.jsp
  应该都是可以运行的,请注意第一、二个地址是单独访问集群中的机器的,而第三个地址是通过了代理的。
  你可以做一个这样的测试,在index.jsp里面写一句System.out.println(“ok!!!”);
  然后再http://10.21.18.40:7004/testApp/index.jsp这个地址上多刷几次,到mServer1和mServer2的控制台去看的话应该两边都有输出。
  使用apache作为代理安装代理插件
  在weblogic安装目录下面,找到bea/weblogic81/server/bin目录,下面有两个文件:
  mod_wl_20.so
  mod_wl128_20.so
  分别是对应不同版本的apache,这里用来测试的是2.0版的apache,所以使用了第一个文件。
  安装过程如下:
  ?         把mod_wl_20.so这个文件copy到apache安装目录下的modules目录中
  
 
 

运维网声明 1、欢迎大家加入本站运维交流群:群②:261659950 群⑤:202807635 群⑦870801961 群⑧679858003
2、本站所有主题由该帖子作者发表,该帖子作者与运维网享有帖子相关版权
3、所有作品的著作权均归原作者享有,请您和我们一样尊重他人的著作权等合法权益。如果您对作品感到满意,请购买正版
4、禁止制作、复制、发布和传播具有反动、淫秽、色情、暴力、凶杀等内容的信息,一经发现立即删除。若您因此触犯法律,一切后果自负,我们对此不承担任何责任
5、所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其内容的准确性、可靠性、正当性、安全性、合法性等负责,亦不承担任何法律责任
6、所有作品仅供您个人学习、研究或欣赏,不得用于商业或者其他用途,否则,一切后果均由您自己承担,我们对此不承担任何法律责任
7、如涉及侵犯版权等问题,请您及时通知我们,我们将立即采取措施予以解决
8、联系人Email:admin@iyunv.com 网址:www.yunweiku.com

所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其承担任何法律责任,如涉及侵犯版权等问题,请您及时通知我们,我们将立即处理,联系人Email:kefu@iyunv.com,QQ:1061981298 本贴地址:https://www.yunweiku.com/thread-192101-1-1.html 上篇帖子: 如何在linux的weblogic上增加启动参数 下篇帖子: Weblogic在Linux下启动特别慢及进入控制台慢的解决方法
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

扫码加入运维网微信交流群X

扫码加入运维网微信交流群

扫描二维码加入运维网微信交流群,最新一手资源尽在官方微信交流群!快快加入我们吧...

扫描微信二维码查看详情

客服E-mail:kefu@iyunv.com 客服QQ:1061981298


QQ群⑦:运维网交流群⑦ QQ群⑧:运维网交流群⑧ k8s群:运维网kubernetes交流群


提醒:禁止发布任何违反国家法律、法规的言论与图片等内容;本站内容均来自个人观点与网络等信息,非本站认同之观点.


本站大部分资源是网友从网上搜集分享而来,其版权均归原作者及其网站所有,我们尊重他人的合法权益,如有内容侵犯您的合法权益,请及时与我们联系进行核实删除!



合作伙伴: 青云cloud

快速回复 返回顶部 返回列表