3 Creating and Starting a Managed Server on a Remote System

You can create and start a Managed Server on a remote system by using the pack and unpack commands.

In some WebLogic domains, if you want to run a Managed Server on a system that is remote from the Administration Server for the WebLogic domain, perform the steps described in this chapter.

This chapter includes the following sections:

Creating a Managed Server Template

You can create a Managed Server template by executing the pack command on an existing WebLogic domain that includes the definition of one or more Managed Servers and contains Managed Server definitions in the config.xml file.

To create a Managed Server template:

  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 ORACLE_HOME/oracle_common/common/bin directory.
  2. Run the following command:

    pack -managed=true -domain=domain -template=template.jar -template_name="template_name"

    In this command:

    • domain is the full or relative path of the WebLogic domain from which the template is to be created.

    • template.jar is the full or relative path of the template including the file name 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 WebLogic domain named mydomain.

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

Creating a Managed Server on a Remote System

Before you create a Managed Server on a remote system, ensure that the IP address and port number of the remote system matches the definition of the Managed Servers that are specified in the Managed Server template.

  1. Install WebLogic Server on the systems on which you want to host Managed Servers for the WebLogic domain.

    Note:

    All WebLogic Server instances within a WebLogic domain must run the same version of the WebLogic Server software. For more information about installing WebLogic Server, see Installing the Oracle WebLogic Server and Coherence Software in Installing and Configuring Oracle WebLogic Server and Coherence.

  2. Establish a session with the remote system. You can use any valid method, such as telnet, to do so.
  3. Copy the Managed Server template to the remote system.
  4. On the remote system, navigate to the ORACLE_HOME\oracle_common\common\bin directory.
  5. Run the following command:

    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 system in step 3.

    For example, the following command creates a WebLogic domain named myManagedDomain.

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

Starting Managed Servers on a Remote System

When you use the unpack command to create a WebLogic domain directory for Managed Servers, it contains a customized start script for each Managed Server that is targeted on the current remote system.

The custom start scripts are generated for the servers that either have no machine name assigned or the machine name of the server matches the host name or IP address of the machine where unpack is run. You can use these customized scripts to start the associated Managed Server.

For example, if you create a WebLogic domain that contains two Managed Servers, my_managed_server1 and my_managed_server2, with none of the servers targeted to a machine, and then when you create the Managed Server domain, four custom start scripts are created:

  • startmy_managed_server1.cmd
  • startmy_managed_server1.sh
  • startmy_managed_server2.cmd
  • 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 WebLogic domain as described in Starting and Stopping Servers in Administering Server Startup and Shutdown for Oracle WebLogic Server.
  2. On the remote system, navigate to the directory for the WebLogic domain that you created in Creating a Managed Server on a Remote System.
  3. Start the Managed Server on the remote system.
    • On a Windows system, run one of the following commands at the command 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 system that hosts 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 WebLogic domain.

Note:

You can also start Managed Servers by using Node Manager as described in Use Node Manager to Start a Managed Server in Administering Node Manager for Oracle WebLogic Server.