GlassFish集群配置

Admin Console Series: Create and Start Clusters
clip_image001 This is the first of the Admin Console Series which will cover different topic or functions in GlassFish V2,   and show you  how to accomplish a special task in Admin Console.
This time, we create a domain with  cluster profile and then create a cluster with 2 instances  running on 2 different machines.  I assume you have downloaded and installed a copy of GlassFish V2.   You will need to install GlassFish on all the machines where you want your instance running.
You can  find the step by step instructions below,  but  it maybe better to see this in action. So, just click the Screen Cast on the left and enjoy !!
1.  Install and create domain with cluster profile
Download GlassFish and Install it on your machine where you want you want your DAS and instances running
From now on, the following instructions assumes your
DAS is running on DasMachine
instance 1 running on FirstMachine
instance 2 running on SecondMachine
If you do not have Cluster profile (ie, if you didn't run setup-cluster.xml during installation), create the cluster profile on DasMachine
create-domain --profile cluster --adminport 4848 domainEE
  • Start your cluster profile domain
  • start-domain domainEE
2.  Create and start Node Agents
Create a node agent and then start the node agent on the machine where you want your first instance to run on.  These 2 commands need to be executed on FirstMachine.
create-node-agent --host DasMachine --port 4848 agentOnFirst
start-node-agent agentOnFirst
Create a node agent and then start the node agent on the machine where you want your second instance to run on.  These 2 commands need to be exceuted on SecondMachine
create-node-agent --host DasMachine --port 4848 agentOnSecond
start-node-agent agentOnSecond
3.  Create and start Cluster with Admin Console
Login to Admin Console:   http://DasMachine:4848
Create a cluster
Click  to the Cluster node on the tree
Click on the New Button
Enter the cluster name
Click New button on the Server Instance table:
Enter the name of the server instance, and select the agentOnFirst for the Node agent
Click New button again,
Enter the name of the second server instance, and select the agentOnSecond for the Node agent
Click OK
select this newly created cluster by clicking the first column check box, and then click the Start Cluster button .   This will start the cluster for you.
Click on the cluster name on the table, it will bring you to the general page of the Cluster.   Explore the tabs of this cluster.
Congratulation !!  You have just created a cluster with 2 instances running on 2 different machines.
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值