Creating Templates and Domains Using the pack and unpack Commands

     Previous  Next    Open TOC in new window    View as PDF - New Window  Get Adobe Reader - New Window
Content starts here

How Do I Create and Start a Managed Server on a Remote Machine?

In some domains, you may want to run a managed server on a machine that is remote from the administration server for the domain. You can do this by performing the following steps:

  1. Create a managed server template by using the pack command. A managed server template, by default, contains only those files that are necessary for creating a managed server on a remote machine.
  2. For more information, see How Do I Create a Managed Server Template.

  3. Create a managed server domain directory by copying and unpacking the managed server template on a remote machine. For more information, see How Do I Create a Managed Server on a Remote Machine.
  4. Start the managed server on the remote machine. For more information, see How Do I Start Managed Servers on a Remote Machine

 


How Do I Create a Managed Server Template

You create a managed server template by executing the pack command on an existing domain that includes the definition of one or more managed servers and contains managed server definitions in the config.xml file.

  1. From the command line on the local machine (that is, the machine that contains the administration server and the definition of managed servers), navigate to the BEA_HOME\wlserver_10.0\common\bin directory.
  2. Run the following command:
  3. pack -managed=true -domain=domain
    -template=template.jar -template_name="template_name"

    In this command:

    • domain is the full or relative path of the domain from which the template is to be created.
    • template.jar is tthe full or relative path of the template, and the filename of the template to be created.
    • template_name is a descriptive name for the template, enclosed in quotes.
    • For example, the following command creates a managed server template named mydomain_managed.jar from a domain named mydomain.

      pack -managed=true -domain=C:\bea\user_projects\domains\mydomain -template=C:\bea\user_templates\mydomain_managed.jar -template_name="My Managed Server Domain"

For more information about the parameters of the pack command, see pack.

 


How Do I Create a Managed Server on a Remote Machine

  1. Install WebLogic Server on the machines on which you want to host managed servers for the domain.
  2. Note: All WebLogic Server instances within a domain must run the same version of the WebLogic Server software. For more information about installing WebLogic Server, see the Installation Guide.
  3. Establish a session with the remote machine. You may use any valid method, such as telnet, to do so.
  4. Note: The IP address and port number of the remote machine must match the definition of the managed servers specified in the managed server template.
  5. Copy the managed server template to the remote machine.
  6. For information about creating managed server templates, see How Do I Create a Managed Server Template.

  7. On the remote machine, navigate to the WL_HOME\common\bin directory (WL_HOME is the product directory in which installed WebLogic Server is installed).
  8. Run the following command:
  9. unpack -domain=domain -template=template.jar

    In this command:

    • domain is the full or relative path of the domain to be created.
    • template.jar is the full or relative path of the managed server template that you copied to the machine in step 3.
    • For example, the following command creates a domain named myManagedDomain.

      unpack -domain=C:\bea\user_projects\domains\myManagedDomain -template=C:\bea\user_templates\mydomain_managed.jar

 


How Do I Start Managed Servers on a Remote Machine

When you create a domain directory for managed servers by using the unpack command, it contains a customized start script for each managed server targeted to the current remote machine.

For example, if you create a domain that contains two managed servers, my_managed_server1 and my_managed_server2, and you target the servers to machine m1, when you create the managed server domain directory on machine m1, four custom start scripts are created: startmy_managed_server1.cmd, startmy_managed_server1.sh, startmy_managed_server2.cmd, and startmy_managed_server2.sh. You can use these scripts to start the corresponding managed servers. Alternatively, you can use the startManagedWebLogic script with the required parameters.

  1. Start the administration server for the domain as described in Starting and Stopping Servers.
  2. On the remote machine, navigate to the directory for the domain that you created in How Do I Create a Managed Server on a Remote Machine.
  3. Start the managed server on the remote machine.
    • On a Windows system, run one of the following commands at the DOS prompt:
    • startmy_managed_server

      startManagedWebLogic my_managed_server admin-url

    • On a UNIX system, run one of the following commands:
    • ./startmy_managed_server.sh

      ./startManagedWebLogic.sh my_managed_server admin-url

      In these commands, my_managed_server is the name of the managed server to be started and admin-url is the listen address (host name or IP address) and port number of the machine hosting the administration server. For your convenience, the startManagedWebLogic_Readme.txt file provides a list of all the managed servers and the admin-url for the domain.

Note: You can also start managed servers by using the node manager. For more information, see Node Manager Administrator’s Guide.

  Back to Top       Previous  Next