Creating Templates and Domains Using the pack and unpack Commands
Introduction
This document describes how to use the pack and unpack commands for creating WebLogic domains and templates.
The pack and unpack commands provide a simple, one-step method for creating domains and templates from the command line. You cannot, however, use these commands to customize the contents of your domain or template in the same way as the other tools.
The pack and unpack commands are available in the \common\bin subdirectory of the product installation directory.
In addition to the pack and unpack commands, you can use the Configuration Wizard, Domain Template Builder, or WebLogic Scripting Tool to create domains and templates.
You can create the following types of templates by using the pack command, and then use them to create templates by using the unpack command:
- Domain template: This type of template defines the full set of resources within a domain, including infrastructure components, applications, services, security options, and general environment and operating system options. You can use a domain template as the basis for new domains.
- Managed server template: This type of template defines the subset of resources within a domain that are required to create a managed server domain directory on a remote machine. You can create a managed server template by using the pack command, with the -managed=true option. Subsequently, when you use the managed server template with the unpack command, the managed server domain directory that is created contains sufficient bootstrap information to start the managed server on the remote machine. You can start the managed server on the remote machine by using either the node manager or customized start scripts created when you unpacked the template on the remote machine.
pack
The pack command provides an alternative method for creating a template from the command line in one simple step. Although the pack command does not allow you to customize the contents of your template in the same way as the Domain Template Builder, it helps you do the following tasks quickly:
- Create a domain template that contains a snapshot of an entire working domain.
You can then use this template as the basis for a new domain that you create by using either the unpack command, Configuration Wizard, or WLST.
- Create a managed server template that contains a subset of the files in a domain that are required to create a managed server domain directory hierarchy on a remote machine.
You can then create the managed server domain directory on the remote machine by using the unpack command. For more information, see How Do I Create and Start a Managed Server on a Remote Machine?.
For information about the syntax and parameters of the pack command, see pack.
unpack
The unpack command provides a one-step method for creating a domain quickly from an existing template by using the default settings defined in the template. When creating a domain, unpack does not provide the same customization options as the Configuration Wizard or WLST. If, however, you use the unpack command with a domain template, you can do the following:
- Change the password for the default administrative user defined in the template.
- Add an administrative user when the default administrative user already has a password specified in the template.
- Specify the JDK and start mode for the domain.
- Specify an applications directory, if one is supported by the template.
By using unpack, you can also create a managed server domain directory based on a managed server template created with the pack command. The managed server uses the settings defined for the administration server; so you cannot change the JDK or the start mode, add administrative users, or change the administrator password.
You cannot use unpack to extend an existing domain.
For information about the syntax and parameters of the unpack command, see unpack.
Related Topics
- Creating WebLogic Domains Using the Configuration Tool
- Creating Templates Using the Domain Template Builder
- WebLogic Scripting Tool