This chapter describes how to create and start a Managed Server on a remote machine using the pack
and unpack
command.
In some WebLogic domains, you may want to run a Managed Server on a machine that is remote from the Administration Server for the WebLogic domain. You can do this by performing the following steps:
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.
For more information, see Section 3.1, "Creating a Managed Server Template."
Create a Managed Server domain directory by copying and unpacking the Managed Server template on a remote machine.
For more information, see Section 3.2, "Creating a Managed Server on a Remote Machine."
Start the Managed Server on the remote machine.
For more information, see Section 3.3, "Starting Managed Servers on a Remote Machine."
You 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.
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 MW_HOME\wlserver_10.3\common\bin
directory.
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, 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 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"
Install WebLogic Server on the machines 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 the Oracle WebLogic Server Installation Guide.
Establish a session with the remote machine. You may use any valid method, such as telnet, to do so.
The IP address and port number of the remote machine must match the definition of the Managed Servers specified in the Managed Server template.
Copy the Managed Server template to the remote machine.
On the remote machine, navigate to the WLS_HOME\common\bin
directory.
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 machine 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
When you create a WebLogic 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 WebLogic 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.
Start the Administration Server for the WebLogic domain as described in Starting and Stopping Servers.
On the remote machine, navigate to the directory for the WebLogic domain that you created in Section 3.2, "Creating a Managed Server on a Remote Machine."
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 WebLogic domain.
Note:
You can also start Managed Servers by using the node manager. For more information, see Node Manager Administrator's Guide for Oracle WebLogic Server.