GlassFish集群配置

GlassFish集群配置

    Admin Console Series: Create and Start Clusters

    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.

                                你可能感兴趣的:(集群,server,domain,download,button,Glassfish)