This tutorial shows how to create and configure a domain template for Oracle WebLogic Server 12c.
Approximately 1 hour
By creating and using a customized domain template, you can create domains for multiple development, test, and production environments. Templates are created by using the Domain Template Builder.
This tutorial covers creating and configuring an Oracle WebLogic Server 12c (12.1.1) domain template by using the Domain Template Builder tool. It then shows how to use that template to create a new WebLogic Server domain.
The following is a list of software requirements:
Before starting this tutorial, you should have completed the Oracle by Example tutorial titled Oracle WebLogic Server 12c: Installing WebLogic Server and Creating a Domain.
To create a new Oracle WebLogic Server 12c domain template by using the Domain Template Builder, perform the following steps:
. |
In a Terminal window, navigate to the location
of the Domain Template Builder tool. It is found under
<MIDDLEWARE_HOME>/wlserver_12.1/common/bin.
In this tutorial that is: Run the tool by entering the following command: $ ./config_builder.sh
|
||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
. |
In the Create a New Template window of the builder, select Create a Domain Template and click Next.
|
||||||||||
. |
In the "Select a Template Domain Source" window, click the Select a Domain tab.
|
||||||||||
. |
Use the area below the tab to navigate to a domain to use as the basis for the template. In this tutorial,
the domain chosen is found here:
After selecting the directory of the domain, click Next.
|
||||||||||
. |
In the next window, enter MyTemplate in the Name field. Leave the rest of the fields at their defaults. Then click Next.
|
||||||||||
. |
In the next window, enter mymedrectemplate in the Template jar name field. Leave the Template location field as /u01/app/oracle/Middleware/user_templates. Then click Next.
|
||||||||||
. |
In the "Add or Omit Applications" window, keep all the defaults and click Next.
|
||||||||||
. |
In the Add Files window, click Next.
|
||||||||||
. |
In the Add SQL Scripts window, click Next.
|
||||||||||
. |
In the "Configure the Administration Server" window, enter the following values and click Next.
|
||||||||||
. |
In the "Configure Adminstrator User Name and Password" window, enter the following values and click Next.
|
||||||||||
. |
In the Specify Start Menu Entries window, click Next.
|
||||||||||
. |
In the "Prepare Scripts and Files with Replacement Variables" window, click Next.
|
||||||||||
. |
In the Review WebLogic Domain Template window, click Create.
|
||||||||||
. |
In the Creating Template window, after the progress bar reaches 100%, click Done.
|
||||||||||
. |
In a Terminal window, navigate to the location of the
template jar file to ensure that it has been created.
In this tutorial, the directory is:
$ cd /u01/app/oracle/Middleware/user_templates
|
To create a new WebLogic Server domain from the domain template just created, perform the following steps:
. |
In a Terminal window, navigate to <MIDDLEWARE_HOME>/wlserver_12.1/common/bin. In this tutorial, <MIDDLEWARE_HOME> is /u01/app/oracle/Middleware. Then enter this command to run the configuration wizard: $ ./config.sh
|
---|---|
. |
In the Welcome window of the Configuration Wizard, select Create a new WebLogic domain. Then click Next.
|
. |
In the Select Domain Source window, select Base this domain on an existing template. Then click the Browse button. Use the "Select a Template" dialog box to find the template created earlier. In this tutorial, it is here: After navigating to the correct directory, select the template JAR file and click OK.
|
. |
Back in the Select Domain Source window, click Next.
|
. |
In the "Specify Domain Name and Location" window, enter mydomain in the Domain name field. Leave the Domain location field at the default of /u01/app/oracle/Middleware/user_projects/domains. Then click Next. Note: You are free to choose a different name and location for the domain. A domain is not required to be placed under <MIDDLEWARE_HOME>.
|
. |
In the "Configure Administrator User Name and Password" window, enter a name in the Name field, enter a password in the User password field, and enter the password again in the Confirm user password field. The Description is optional. Then click Next. In the tutorial, the username is weblogic and the password is Welcome1. Important: Do not forget this username and password. These are required to do anything with the domain, from starting servers to changing the domain configuration.
|
. |
In the "Configure Server Start Mode and JDK" window, under the WebLogic Domain Startup Mode, select the Production Mode option. Select Available JDKs and under it select the Sun JDK. In this tutorial, it is the only JDK listed and it is already selected. You may have more than one JDK. Then click Next.
|
. |
In the Configure JDBC Data Sources window, keep all the defaults and click Next.
|
. |
In the Test JDBC Data Sources window, ignore the error and click Next. Note: The database is not running, so when the Configuration Wizard tried connecting to it, it failed.
|
. |
In the Warning dialog box, click OK.
|
. |
In the Select Optional Configuration window, select Administration Server and Managed Servers, Clusters and Machines. Then click Next.
|
. |
In the "Configure the Administration Server" window, leave all the default values and click Next.
|
. |
In the Configure Managed Servers window, click the Add button.
|
. |
When a row appears in the table, enter medrec1 in the managed server Name field. Enter host01.example.com in the Listen address field. Change the Listen port to 8013. Leave the SSL enabled option deselected.
|
. |
Click the Add button again. In the new row, enter medrec2 in the managed server Name field. Enter host01.example.com in the Listen address field. Change the Listen port to 8015. Leave the SSL enabled option deselected. Then click Next.
|
. |
In the Configure Clusters window, just click Next.
|
. |
In the Configure Machines window, just click Next.
|
. |
In the Configuration Summary window, click Create.
|
. |
In the Creating Domain window, after the progress bar reaches 100%, click Done.
A WebLogic Server domain based on the domain template has now been created.
|
. |
To view the directory structure and files for the newly created domain, enter the following commands in a Terminal window:
$ cd /u01/app/oracle/Middleware/user_projects/domains/mydomain
Note: If you placed the domain in a different location, cd to that directory instead.
|
In this tutorial, you learned how to:
![]() |
Copyright © 2011, Oracle and/or its affiliates. All rights reserved |