WebLogicServer_8_集群配置
- 格式:pdf
- 大小:1.01 MB
- 文档页数:18
weblogic的集群与配置图⽂⽅法⼀、Weblogic的集群还记得我们在第五天教程中讲到的关于Tomcat的集群吗?两个tomcat做node即tomcat1, tomcat2,使⽤Apache HttpServer做请求派发。
现在看看WebLogic的集群吧,其实也差不多。
区别在于: 如果我们要布署我们的Web应⽤,需要分别⼿⼯往每个Tomcat的webapp⽬录⾥拷贝⽂件。
Weblogic的集群必须设⽴⼀个总控端,可从上图中看出,然后这个总控端我们把它称为AdminServer,然后在其下可以挂weblogic的集群的node,这个node不是物理上不同的两个weblogic,⽽是不同的domain,我们假设domain1, domain2为两个weblogic的集群的节点。
如果我们要布署我们的Web应⽤,只需要在总控端布署⼀次,然后挂在这个总控端下的节点将会⾃动将我们的web应⽤发布到每⼀个节点。
因此,要实现weblogic的集群必须:安装Weblogic创建⼀个AdminServer的domain在AdminServer上建⽴集群总控端分别创建每⼀个要加⼊此集群总控端的node,也是⼀个个的domain⼆、创建Weblogic集群前的规划根据第⼀节中的内容,我们将我们⽤于实验的Weblogic规划成3个domain,每个domain都包含有下列的必不可少的属性:AdminConsole(总控端) 逻辑名 物理名(domain的系统路径) 端⼝号 计器名(IP) 登录信息(username/password)Cluster node1(集群节点1) 逻辑名 物理名(domain的系统路径) 端⼝号 计器名(IP) 登录信息(username/password)Cluster node2(集群节点2) 逻辑名 物理名(domain的系统路径) 端⼝号 计器名(IP) 登录信息(username/password) 我们⽤表格列出我们将要创建的集群中总控端与每个节点的集息:物理名逻辑名端⼝号主机名(IP)登录信息\bea\user_projects\domains\adminserverAdminServer7001localhost weblogic/password_1\bea\user_projects\domains\server1mycluster17011localhost weblogic/password_1bea\user_projects\domains\server2mycluster27012localhost weblogic/password_1 规划好了,就可以开始来创建我们的集群了。
weblogic集群配置方法案例所属系统案例现象无案例平台环境AIX 5300-04-00AIX 5300-05-CSPWeblogic9.2mp2JDK1.5.0主机结构应用部署案例分析分析过程web应用部署在两台服务器上,客户没有硬件负载均衡器,但要求从唯一的ip和端口登录web应用,通过weblogic集群来实现。
案例解决方法一、在web1主机上执行config.sh脚本建立domain:elndomain11;建立管理server:AdmServer11;建立被管理server: Server11、Server12 (注意:配置被管理server 时把web2主机上的两个被管理server也配置上) 。
详细方法如下:config.shUnable to instantiate GUI, defaulting to console mode.<--------------------- BEA WebLogic Configuration Wizard --------------------->Welcome:--------Choose between creating and extending a domain. Based on your selection,the Configuration Wizard guides you through the steps to generate a new or extend an existing domain.->1|Create a new WebLogic domain| Create a WebLogic domain in your projects directory.2|Extend an existing WebLogic domain| Extend an existing WebLogic domain. Use this option to add|applications and services, or to override existing database access (JDBC) |and messaging (JMS) settings. You can also incorporate additional|functionality in your domain, for example, by including AquaLogic Service |Bus.Enter index number to select OR [Exit][Next]> 1<--------------------- BEA WebLogic Configuration Wizard --------------------->Select Domain Source:---------------------Select the source from which the domain will be created. You can create the domain by selecting from the required components or by selecting from alist of existing domain templates.->1|Choose Weblogic Platform components| You can choose the Weblogic component(s) that you want supported in |your domain.2|Choose custom template| Choose this option if you want to use an existing template. This|could be a custom created template using the Template Builder.Enter index number to select OR [Exit][Previous][Next]> 1<--------------------- BEA WebLogic Configuration Wizard --------------------->Application Template Selection:-------------------------------Available Templates|_____WebLogic Server (Required)xEnter number exactly as it appears in brackets to toggle selection OR [Exit][Previous][Next]>1、设置管理帐号和口令<--------------------- BEA WebLogic Configuration Wizard --------------------->Configure Administrator Username and Password:----------------------------------------------Create a user to be assigned to the Administrator role. This user is the default administrator used to start development mode servers.| Name | Value |_|_________________________|_________________________________________|1| *User name: | weblogic |2| *User password: | |3| *Confirm user password: | |4| Description: | This user is the default administrator. |Use above value or select another option:1 - Modify "User name"2 - Modify "User password"3 - Modify "Confirm user password"4 - Modify "Description"Enter option number to select OR [Exit][Previous][Next]> 2<--------------------- BEA WebLogic Configuration Wizard --------------------->Configure Administrator Username and Password:----------------------------------------------Create a user to be assigned to the Administrator role. This user is the default administrator used to start development mode servers."*User password:" = []Enter new *User password: OR [Exit][Reset][Accept]> xxxxxxxx<--------------------- BEA WebLogic Configuration Wizard --------------------->Configure Administrator Username and Password:----------------------------------------------Create a user to be assigned to the Administrator role. This user is the default administrator used to start development mode servers.| Name | Value |_|_________________________|_________________________________________|1| *User name: | weblogic |2| *User password: | ********* |3| *Confirm user password: | |4| Description: | This user is the default administrator. |Use above value or select another option:1 - Modify "User name"2 - Modify "User password"3 - Modify "Confirm user password"4 - Modify "Description"5 - Discard ChangesEnter option number to select OR [Exit][Previous][Next]> 3<--------------------- BEA WebLogic Configuration Wizard --------------------->Configure Administrator Username and Password:----------------------------------------------Create a user to be assigned to the Administrator role. This user is the default administrator used to start development mode servers."*Confirm user password:" = []Enter new *Confirm user password: OR [Exit][Reset][Accept]> xxxxxxxx<--------------------- BEA WebLogic Configuration Wizard --------------------->Configure Administrator Username and Password:----------------------------------------------Create a user to be assigned to the Administrator role. This user is the default administrator used to start development mode servers.| Name | Value |_|_________________________|_________________________________________|1| *User name: | weblogic |2| *User password: | ********* |3| *Confirm user password: | ********* |4| Description: | This user is the default administrator. |Use above value or select another option:1 - Modify "User name"2 - Modify "User password"3 - Modify "Confirm user password"4 - Modify "Description"5 - Discard ChangesEnter option number to select OR [Exit][Previous][Next]><--------------------- BEA WebLogic Configuration Wizard --------------------->Domain Mode Configuration:--------------------------Enable Development or Production Mode for this domain.->1|Development Mode2|Production ModeEnter index number to select OR [Exit][Previous][Next]> 2<--------------------- BEA WebLogic Configuration Wizard ---------------------> Java SDK Selection:-------------------->1|IBM SDK 1.5.0 @ /usr/java5_642|Other Java SDKEnter index number to select OR [Exit][Previous][Next]> 1<--------------------- BEA WebLogic Configuration Wizard --------------------->Choose Configuration Option:----------------------------*Do you want to modify any of the preconfigured settings or defaults in*your template?**To keep the default or template settings, and proceed directly to name and *create your domain, leave No selected.1|Yes->2|NoEnter index number to select OR [Exit][Previous][Next]> 12、建立管理server<--------------------- 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: | AdminServer |2| Listen address: | All Local Addresses |3| Listen port: | 7001 |4| SSL listen port: | N/A |5| SSL enabled: | false |Use above value or select another 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<--------------------- 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: | AdminServer |2| Listen address: | All Local Addresses |3| Listen port: | 7001 |4| SSL listen port: | N/A |5| SSL enabled: | false |Enter value for "Name" OR [Exit][Previous][Next]> AdmServer11<--------------------- 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: | AdmServer11 |2| Listen address: | All Local Addresses |3| Listen port: | 7001 |4| SSL listen port: | N/A |5| SSL enabled: | false |Use above value or select another option:1 - Modify "Name"2 - Modify "Listen address"3 - Modify "Listen port"4 - Modify "SSL enabled"5 - Discard ChangesEnter option number to select OR [Exit][Previous][Next]> 2<--------------------- 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: | AdmServer11 |2| Listen address: | All Local Addresses |3| Listen port: | 7001 |4| SSL listen port: | N/A |5| SSL enabled: | false |Enter value for "Listen address" OR [Exit][Previous][Next]> 134.32.9.61<--------------------- 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: | AdmServer11 |2| Listen address: | 134.32.9.61 |3| Listen port: | 7001 |4| SSL listen port: | N/A |5| SSL enabled: | false |Use above value or select another option:1 - Modify "Name"2 - Modify "Listen address"3 - Modify "Listen port"4 - Modify "SSL enabled"5 - Discard ChangesEnter option number to select OR [Exit][Previous][Next]> 3<--------------------- 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: | AdmServer11 |2| Listen address: | 134.32.9.61 |3| Listen port: | 7001 |4| SSL listen port: | N/A |5| SSL enabled: | false |Enter value for "Listen port" OR [Exit][Previous][Next]> 9001<--------------------- 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: | AdmServer11 |2| Listen address: | 134.32.9.61 |3| Listen port: | 9001 |4| SSL listen port: | N/A |5| SSL enabled: | false |Use above value or select another option:1 - Modify "Name"2 - Modify "Listen address"3 - Modify "Listen port"4 - Modify "SSL enabled"5 - Discard ChangesEnter option number to select OR [Exit][Previous][Next]>3、配置被管理server<--------------------- 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 Serveris 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 OR [Exit][Previous][Next]> Server11<--------------------- 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 Serveris an instance of WebLogic Server used to host enterprise applications.| Name* | Listen address |Listen port |SSL listen port |SSL enabled | _|_________|___________________|____________|________________|____________| 1->|Server11 |All Local Addresses| 7001 | N/A | false |Use above value or select another option:1 - Modify "Name"2 - Modify "Listen address"3 - Modify "Listen port"4 - Modify "SSL enabled"5 - DoneEnter option number to select OR [Exit][Previous][Next]> 2<--------------------- 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 Serveris an instance of WebLogic Server used to host enterprise applications.| Name* | Listen address |Listen port |SSL listen port |SSL enabled |_|_________|___________________|____________|________________|____________| 1->|Server11 |All Local Addresses| 7001 | N/A | false |Modify "Listen address" OR [Exit][Previous][Next]> 134.32.9.61<--------------------- 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 Serveris an instance of WebLogic Server used to host enterprise applications.| Name* | Listen address | Listen port | SSL listen port | SSL enabled | _|__________|________________|_____________|_________________|_____________| 1->| Server11 | 134.32.9.61 | 7001 | N/A | false |Use above value or select another option:1 - Modify "Name"2 - Modify "Listen address"3 - Modify "Listen port"4 - Modify "SSL enabled"5 - DoneEnter option number to select OR [Exit][Previous][Next]> 3<--------------------- 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 Serveris an instance of WebLogic Server used to host enterprise applications.| Name* | Listen address | Listen port | SSL listen port | SSL enabled | _|__________|________________|_____________|_________________|_____________| 1->| Server11 | 134.32.9.61 | 7001 | N/A | false |Modify "Listen port" OR [Exit][Previous][Next]> 10011<--------------------- 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 Serveris an instance of WebLogic Server used to host enterprise applications.| Name* | Listen address | Listen port | SSL listen port | SSL enabled | _|__________|________________|_____________|_________________|_____________| 1->| Server11 | 134.32.9.61 | 10011 | N/A | false |Use above value or select another option:1 - Modify "Name"2 - Modify "Listen address"3 - Modify "Listen port"4 - Modify "SSL enabled"5 - DoneEnter option number to select OR [Exit][Previous][Next]> 5<--------------------- 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 Serveris an instance of WebLogic Server used to host enterprise applications.| Name* | Listen address | Listen port | SSL listen port | SSL enabled | _|__________|________________|_____________|_________________|_____________| 1->| Server11 | 134.32.9.61 | 10011 | N/A | false |Use above value or select another option:1 - Add2 - Modify3 - Delete4 - Discard ChangesEnter option number to select OR [Exit][Previous][Next]> 1<--------------------- 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 Serveris an instance of WebLogic Server used to host enterprise applications.| Name* | Listen address | Listen port | SSL listen port | SSL enabled | _|__________|________________|_____________|_________________|_____________| 1->| Server11 | 134.32.9.61 | 10011 | N/A | false |Enter name for a new OR [Exit][Previous][Next]> ProxyServer11<--------------------- 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 Serveris an instance of WebLogic Server used to host enterprise applications.| Name* | Listen address |Listen port|SSL listen port|SSL enabled| _|_____________|__________________|___________|_______________|___________| 1| Server11 | 134.32.9.61 | 10011 | N/A | false | 2->|ProxyServer11|All Local Addre...| 7001 | N/A | false |Use above value or select another option:1 - Modify "Name"2 - Modify "Listen address"3 - Modify "Listen port"4 - Modify "SSL enabled"5 - DoneEnter option number to select OR [Exit][Previous][Next]> 2<--------------------- 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 Serveris an instance of WebLogic Server used to host enterprise applications.| Name* | Listen address |Listen port|SSL listen port|SSL enabled| _|_____________|__________________|___________|_______________|___________| 1| Server11 | 134.32.9.61 | 10011 | N/A | false | 2->|ProxyServer11|All Local Addre...| 7001 | N/A | false |Modify "Listen address" OR [Exit][Previous][Next]> 134.32.9.61<--------------------- 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 Serveris an instance of WebLogic Server used to host enterprise applications.| Name* |Listen address |Listen port |SSL listen port |SSL enabled | _|______________|_______________|____________|________________|____________| 1| Server11 | 134.32.9.61 | 10011 | N/A | false | 2->|ProxyServer11 | 134.32.9.61 | 7001 | N/A | false |Use above value or select another option:1 - Modify "Name"2 - Modify "Listen address"3 - Modify "Listen port"4 - Modify "SSL enabled"5 - DoneEnter option number to select OR [Exit][Previous][Next]> 3<--------------------- 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 Serveris an instance of WebLogic Server used to host enterprise applications.| Name* |Listen address |Listen port |SSL listen port |SSL enabled | _|______________|_______________|____________|________________|____________| 1| Server11 | 134.32.9.61 | 10011 | N/A | false | 2->|ProxyServer11 | 134.32.9.61 | 7001 | N/A | false |Modify "Listen port" OR [Exit][Previous][Next]> 8090<--------------------- 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 Serveris an instance of WebLogic Server used to host enterprise applications.| Name* |Listen address |Listen port |SSL listen port |SSL enabled | _|______________|_______________|____________|________________|____________| 1| Server11 | 134.32.9.61 | 10011 | N/A | false | 2->|ProxyServer11 | 134.32.9.61 | 8090 | N/A | false |Use above value or select another option:1 - Modify "Name"2 - Modify "Listen address"3 - Modify "Listen port"4 - Modify "SSL enabled"5 - DoneEnter option number to select OR [Exit][Previous][Next]> 5继续添加被管理server,最终web1主机上被管理server如下:<--------------------- 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 Serveris an instance of WebLogic Server used to host enterprise applications.| Name* |Listen address |Listen port |SSL listen port |SSL enabled | _|______________|_______________|____________|________________|____________| 1| Server11 | 134.32.9.61 | 10011 | N/A | false | 2| Server12 | 134.32.9.61 | 10012 | N/A | false | 3|ProxyServer11 | 134.32.9.61 | 8090 | N/A | false | 4| Server21 | 134.32.9.138 | 10021 | N/A | false | 5->| Server22 | 134.32.9.138 | 10022 | N/A | false |Use above value or select another option:1 - Add2 - Modify3 - Delete4 - Discard ChangesEnter option number to select OR [Exit][Previous][Next]>4、配置集群<--------------------- BEA WebLogic Configuration Wizard --------------------->Configure Clusters:-------------------Add or delete configuration information for clusters. A cluster contains multiple WebLogic Server instances that run simultaneously and worktogether to provide increased scalability and reliability. A clusterappears 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]> elnclu1<--------------------- BEA WebLogic Configuration Wizard --------------------->Configure Clusters:-------------------Add or delete configuration information for clusters. A cluster contains multiple WebLogic Server instances that run simultaneously and worktogether to provide increased scalability and reliability. A clusterappears to be a single WebLogic Server instance to clients.| Name* | Multicast address | Multicast port | Cluster address |_|_________|___________________|________________|_________________|1->| elnclu1 | 239.192.0.0 | 7001 | |Use above value or select another option:1 - Modify "Name"2 - Modify "Multicast address"3 - Modify "Multicast port"4 - Modify "Cluster address"5 - DoneEnter option number to select OR [Exit][Previous][Next]> 3<--------------------- BEA WebLogic Configuration Wizard --------------------->Configure Clusters:-------------------Add or delete configuration information for clusters. A cluster contains multiple WebLogic Server instances that run simultaneously and worktogether to provide increased scalability and reliability. A clusterappears to be a single WebLogic Server instance to clients.| Name* | Multicast address | Multicast port | Cluster address |_|_________|___________________|________________|_________________|1->| elnclu1 | 239.192.0.0 | 7001 | |Modify "Multicast port" OR [Exit][Previous][Next]> 7777<--------------------- BEA WebLogic Configuration Wizard --------------------->Configure Clusters:-------------------Add or delete configuration information for clusters. A cluster contains multiple WebLogic Server instances that run simultaneously and worktogether to provide increased scalability and reliability. A clusterappears to be a single WebLogic Server instance to clients.| Name* | Multicast address | Multicast port | Cluster address |_|_________|___________________|________________|_________________|1->| elnclu1 | 239.192.0.0 | 7777 | |Use above value or select another option:1 - Modify "Name"2 - Modify "Multicast address"3 - Modify "Multicast port"4 - Modify "Cluster address"5 - DoneEnter option number to select OR [Exit][Previous][Next]> 5<--------------------- BEA WebLogic Configuration Wizard --------------------->Configure Clusters:-------------------Add or delete configuration information for clusters. A cluster contains multiple WebLogic Server instances that run simultaneously and worktogether to provide increased scalability and reliability. A clusterappears to be a single WebLogic Server instance to clients.| Name* | Multicast address | Multicast port | Cluster address |_|_________|___________________|________________|_________________|1->| elnclu1 | 239.192.0.0 | 7777 | |Use above value or select another option:1 - Add Cluster2 - Modify Cluster3 - Delete Cluster4 - Discard ChangesEnter option number to select OR [Exit][Previous][Next]><--------------------- BEA WebLogic Configuration Wizard --------------------->Assign Servers to Clusters:---------------------------Assign Managed Servers to a cluster in the domain.Cluster|_____elnclu1 [1]Enter number exactly as it appears in brackets to toggle selection OR [Exit][Previous][Next]> 1<--------------------- BEA WebLogic Configuration Wizard --------------------->Assign Servers to Clusters:---------------------------Assign Managed Servers to a cluster in the domain.*Select WebLogic Servers and assign them to a cluster. elnclu11|Server112|Server123|ProxyServer114|Server215|Server22Use above value or select another option:1 - Select2 - Select AllEnter option number to select OR [Exit][Discard][Accept]> 1<--------------------- BEA WebLogic Configuration Wizard --------------------->Assign Servers to Clusters:---------------------------Assign Managed Servers to a cluster in the domain.*Select WebLogic Servers and assign them to a cluster. elnclu11|Server112|Server123|ProxyServer114|Server215|Server22Select( Enter index numbers and/or index ranges separated by commas. For example, 1, 4-5 ) OR [Exit][Discard][Accept]> 1<--------------------- BEA WebLogic Configuration Wizard --------------------->Assign Servers to Clusters:---------------------------Assign Managed Servers to a cluster in the domain.*Select WebLogic Servers and assign them to a cluster. elnclu1->1|Server112|Server123|ProxyServer11。
Weblogic 集群配置文章分类:互联网1、Weblogic10.3.1.0.0集群配置要求1、两台在同一网段的,可以相互访问的计算机。
2、两台计算机都安装了Weblogic10.3.1.0.0版本的应用服务器。
3、安装介质注意:集群中的Weblogic版本一定要相同。
2、Weblogic集群规划1、集群规划(两台物理机分别为称为机器A和机器B)机器名称硬件配置服务器名机器类型AdminServer(admin)PC机器A IP:192.168.10.214 PORT:7001ProxyServer_1PC机器A IP:192.168.10.214 PORT:7004PC机器A IP:192.168.10.214 PORT:ManagedServer_17002PC机器B IP:192.168.10.88 PORT:7003ManagedServer_23、Weblogic集群配置(机器A)1、「开始」菜单\程序\Oracle WebLogic (BEAHOME 1)\WebLogic Server10gR3\Tools\Configuration Wizard,单击启动Configuration Wizard,默认点击Next2、默认,点击Next3、输入Weblogic管理员密码,点击Next4、选中Production Mode,点击Next5、选中Yes,点击Next6、默认,点击Next7、默认,点击Next8、新增管理服务器,填写管理服务器的Name,Listen address,Listen port,完成管理服务器添加,点击Next9、添加Clusters,完成cluter添加,点击Next10、把Server栏的服务器添加到Cluster栏中,点击Next11、默认,点击Next12、默认,点击Next13、在Domain name中输入TestDomain,点击Create14、选中Start Admin Server,点击Done完成A机器上的集群配置。
配置WebLogic Server在WebLogic Server 8.1上配置集群,以及通过Proxy Server来访问集群。
1. 本文环境平台:WindowsXp软件:Bea WebLogic Server 8.1 SP42. 配置WebLogic Server集群2.1. 配置集群应用的必要条件集群中的所有Server必须位于同一网段,并且必须是IP广播(UDP)可到达的集群中的所有Server必须使用相同的版本,包括Service Pack集群中的Server必须使用永久的静态IP地址。
动态IP地址分配不能用于集群环境。
如果服务器位于防火墙后面,而客户机位于防火墙外面,那么服务器必须有公共的静态IP地址,只有这样,客户端才能访问服务器2.2. 配置前的准备工作在配置集群应用前要对集群的配置信息有一个良好的设计,下面就是我们这次配置的集2.3. 使用Domain Configuration Wizard进行配置创建新的Domain选择“Create a new WebLogic configuration”,单击“Next”按钮选择安装类型选择安装“Basic WebLogic Server Domain”,单击“Next”按钮选择定制安装选择“Custom”安装,单击“Next”按钮输入Administrator Server的信息输入Administrator Server的名称,监听地址,监听端口,如果需要SSL支持的话可以在“SSL enabled”后面的复选取框上打勾,配置SSL监听端口,单击“Next”按钮是否配置Server、Cluster、Machine信息选择“Yes”,对Server、Cluster、Machine信息进行配置,,单击“Next”按钮配置Managed Server信息输入Managed Server的名称,监听地址,监听端口,如果需要SSL支持的话,可以在“SSL enabled”复选框上打勾,配置SSL监听端口。
集群配置实战1集群配置设计2资源管理Adminserver的建立 2.1打开domain管理器选择Create a new Weblogic domain,点击下一步。
2.2用自定义方式创建domain选择Generate a domain configured automatically to support the following BEA products,点击下一步。
2.3打开domain管理器设置domain的管理员帐户及密码,这里我们username输入weblogic;userpassword输入weblogic,点击下一步。
2.4选择JDK版本在这里JDK的版本我们选择SUN的,点击下一步。
2.5是否进阶设置是否继续进行配置,如果选择否则采用默认参数,如果选择是则对参数进行进阶设置。
这里我们选择“是”,点击下一步。
2.6设置domain名称、IP地址及端口信息根据集群配置设计,我们在Adminserver内填写server名称为Adminserver,IP选择固定IP,端口填写9100,点击下一步。
2.7设置Adminserver管理的server实例列表根据集群配置设计,我们填写server118、server119、以及proxy信息后,点下一步。
2.8设置多播服务器将server118、server119实例填写到Claster Address内,以逗号分割。
点击下一步。
2.9设置受播服务列表在这里我们需要设置上一步新建的多播的服务列表,我们选择server118、server1192.10为proxy创建weblogic提供的默认分发项目首先选择Create HTTP proxy for cluster new _Cluster_1,然后在Proxy server地址里选择proxy2.11JMS设置这里我们没有相关实例,所以直接下一步。
2.12设置信息预览根据设置情况,将创建的实例关系进行汇总确认,直接选择下一步。
配置WebLogic Server集群(本文讲述如何在WebLogic Server 8.1上配置集群,以及通过Proxy Server来访问集群)预备知识什么是Domain和ServerDomainDomain是WebLogic Server实例的基本管理单元。
所谓Domain就是,由配置为Administrator Server的WebLogic Server实例管理的逻辑单元,这个单元是有所有相关资源的集合。
ServerServer是一个相对独立的,为实现某些特定功能而结合在一起的单元。
Domain and Server的关系一个Domain 可以包含一个或多个WebLogic Server实例,甚至是Server集群。
一个Domain中有一个且只能有一个Server 担任管理Server的功能,其它的Server具体实现一个特定的逻辑功能。
本文环境Ø平台:Windows 2000Ø软件:Bea WebLogic Server 8.1 SP2配置WebLogic Server集群WebLogic集群的体系结构单层混合型的集群架构(Cluster)这种架构将所有的Web应用以及相关的服务应用全部置于集群中的单一WLS实例中,这种架构的优势在于:Ø易于管理Ø灵活的负载平衡机制Ø更强的安全控制多层结构的集群架构(Cluster)这种架构使用两个WLS集群,一个放置表静态内容和集群Servlet,另一个放置集群EJB。
一般应用于下面这些情况:Ø在负载平衡机制需要调用集群EJB中的方法时;Ø在提供内容与提供对象的服务之间需要更大的机动性时;Ø在需要更高的系统稳定性时;配置集群应用的必要条件Ø集群中的所有Server必须位于同一网段,并且必须是IP广播(UDP)可到达的Ø集群中的所有Server必须使用相同的版本,包括Service PackØ集群中的Server必须使用永久的静态IP地址。
动态IP地址分配不能用于集群环境。
如果服务器位于防火墙后面,而客户机位于防火墙外面,那么服务器必须有公共的静态IP地址,只有这样,客户端才能访问服务器Ø要以CLUSTER方式运行,必须有包含CLUSTER许可的LICENSE才行(从Bea网站上下载的试用版本就可以进行Cluster配置)配置前的准备工作在配置集群应用前要对集群的配置信息有一个良好的设计,下面就是我们这次配置的集群信息:在同一台机器上配置集群机器类型操作系统硬件配置角色备注DELL PC Win2000 Professional IP:10.16.92.33 PORT:7080 Administrator ServerDELL PC Win2000 Professional IP:10.16.92.33 PORT:8080 Proxy ServerDELL PC Win2000 Professional IP:10.16.92.33 PORT:7082 Managed ServerDELL PC Win2000 Professional IP:10.16.92.33 PORT:7084 Managed ServerDELL PC Win2000 Professional IP:10.16.92.33 PORT:7086 Managed Server在同一网段内的不同机器上配置集群机器类型操作系统硬件配置角色备注DELL PC Win2000 Server IP:10.16.92.7 PORT:7080 Administrator ServerDELL PC Win2000 Server IP:10.16.92.7 PORT:8080 Proxy ServerDELL PC Win2000 Server IP:10.16.92.7 PORT:7082 Managed ServerDELL PC Win2000 Server IP:10.16.92.33 PORT:7084 Managed Server使用Domain Configuration Wizard进行配置创建新的Domain选择“Create a new WebLogic configuration”,单击“Next”按钮选择安装类型选择安装“Basic WebLogic Server Domain”,单击“Next”按钮选择定制安装选择“Custom”安装,单击“Next”按钮输入Administrator Server的信息输入Administrator Server的名称,监听地址,监听端口,如果需要SSL支持的话可以在“SSL enabled”后面的复选取框上打勾,配置SSL监听端口,单击“Next”按钮是否配置Server、Cluster、Machine信息选择“Yes”,对Server、Cluster、Machine信息进行配置,,单击“Next”按钮配置Managed Server信息输入Managed Server的名称,监听地址,监听端口,如果需要SSL支持的话,可以在“SSL enabled”复选框上打勾,配置SSL监听端口。
可以配置多个Managed Server。
单击“Next”按钮配置Cluster信息输入Cluster的名称,Cluster的组播地址和端口,Cluster地址可输可不输。
单击“Next”按钮将Managed Server添加到Cluster中选择左面列表中的Managed Server,将其添加到右面的列表中,单击“Next”按钮配置Machine信息在此不对Machine进行配置,单击“Next”按钮是否配置JDBC信息在此不对JDBC数据源和连接池进行配置,单击“Next”按钮配置JMS信息在此不对JMS进行配置,单击“Next”按钮配置缺省系统管理员用户名和密码输入系统管理员用户名和密码,还可以配置其它的系统管理用户,在此不做配置,单击“Next”按钮配置Windows附加选项可以选择是否创建开始菜单中的快捷方式,是否将该服务作为Windows系统服务,在这里我们全部选择“No”,单击“Next”按钮配置服务的启动模式并选择Java SDK选择“Development Mode”模式,并选择标准的Java SDK 1.4,在开发模式下会有比较丰富的调试信息,对我们很有帮助,单击“Next”按钮配置信息确认以及选择安装路径系统列出您的配置信息,并指定了缺省的安装路径(D:\bea\user_projects\domains\mydomain),在此我们将安装路径定位在D:\bea\user_projects\clusterdomain,单击“Create”按钮系统创建Domain系统根据配置信息,完成缺省的目录及文件的创建启动WebLogic服务Ø启动Administrator Server使用startWebLogic命令启动Administrator ServerØ启动Managed Server使用startManagedWeblogic命令启动Managed Server,它的命令格式是:startManagedWeblogic.cmd Managed Server的名称Administrator Server地址同理可以启动nodeB和nodeC,以及Proxy Server通过HttpClusterServlet实现请求的自动分发处理HttpClusterServlet通过一个WebLogic服务器代理对WebLogic集群中的其他服务器成员的HTTP请求,同时HttpClusterServlet还为代理的HTTP请求提供负载平衡与容错处理。
实际上实现是很简单的,遵循下面几个步骤就可以轻松实现请求的自动分发功能:Ø创建一个代理Server(在此我们称这proxyServer)Ø生成配置文件web.xmlØ生成配置文件weblogic.xmlØ打包生成Web应用Ø在proxyServer上部署应用,并将该应用作为缺省的Web应用创建代理Server启动Administrator Server,然后进入Console控制台(http://10.16.92.33:7080/console/),在此我们将代理Server与Administrator Server置于同一台主机之上。
进入console控制台后,在“Server”结点上单击右键,在弹出菜单上选择“Configure a New Server”,然后配置代理Server的相关信息。
(在这里只要指定名称,监听地址,监听端口就可以了)HttpClusterServlet的部署,主要是Servlet的声明和映射,并设置初始化参数,可以创建一个Web App,然后直接在web.xml中添加或在管理控制台上设置HttpClusterServlet的部署信息。
最后将它发布给用来做代理的Server,并将这个Web App设置为这个Server的缺省WEB应用。
web.xml文件示例weblogic.xml文件示例打包WEB应用可以使用jar命令将proxy应用打包成war文件,我们建一个临时目录temp,然后在其中建立如下目录结构:使用如下的命令操作,就可完成web应用的打包操作:JAR –参数WEB应用名称要打包的目录当然我们也可以直接部署该目录,而无需打包,这在项目的开发阶段是很有帮助的,便于修改。
部署proxy应用启动Administrator Server,然后进入Console控制台(http://10.16.92.33:7080/console/),在此我们将代理Server与Administrator Server置于同一台主机之上。
进入console控制台后,在“Web Application Modules”结点上单击右键,在弹出菜单上选择“Deploy a new Web Application Module”,然后选择要部署的文件或目录,单击“Target Module”按钮,然后选择“proxyServer”,单击“Continue”按钮,到了下一步,单击“Deploy”按钮,完成部署工作。
部署完成后,查看WEB应用的状态是“FAILS”,造成这种情况的原因是“proxyServer”还没有启动,我们可以通过下面的命令启动“proxyServer”:然后点击“ReDeploy”,重新部署应用,状态值将变为“Success”。