bea.com | products | dev2dev | support | askBEA

Download Docs | Site Map | Glossary
Search

Creating and Configuring WebLogic Server Domains

Creating New Domains Using the Configuration Wizard

The following sections describe how to create WebLogic Server domains using the Configuration Wizard:

- Introduction to the Configuration Wizard

- Determine the Server Name and Listen Address

- Using the Configuration Wizard

Introduction to the Configuration Wizard

The Configuration Wizard is a standalone application—you do not have to start WebLogic Server to run the Configuration Wizard—that helps you create new, customized WebLogic Server domains. It is automatically installed when you install WebLogic Server.

At the end of a Custom Installation of WebLogic Server, you have the option, but are not required, to run the Configuration Wizard. You can also invoke the Configuration Wizard any time after an installation using the instructions in Starting the Configuration Wizard.

The Configuration Wizard presents dialogs that help you create or extend domains by adding individual servers. You begin by selecting a domain template, which defines rough characteristics for the new domain such as:

- Whether the domain includes the pre-configured WebLogic Server examples application or the Pet Store application.

- The number of Managed Servers to configure for the domain.

- Whether you want to configure the new Managed Servers as a cluster.

The Configuration Wizard eases the process of creating domains using underlying templates and dialogs that allow you to specify the characteristics of your domain.

What Does the Configuration Wizard Create?

Based on the responses you provide to the dialogs presented by the Configuration Wizard, the wizard creates a config.xml file for the domain. The Configuration Wizard also creates startup scripts for the server instances in the domain, and other helper files and directories to help you start and use the new domain and its servers.

The Configuration Wizard stores the config.xml file and all other generated components in a domain directory that you specify during the dialogs (by default /user_projects/mydomain).

The following table describes the files and directories that the Configuration Wizard creates.

Table 2-1 Components Installed with Configuration Wizard

Component | Function
--- | ---
config.xml | The config.xml file is an XML document that describes the configuration of a WebLogic Server domain. The content and structure of the config.xml is defined in the associated Document Type Definition (DTD), config.dtd. config.xml consists of a series of XML elements. The Domain element is the top-level element, and all elements in the Domain descend from the Domain element. The Domain element includes child elements, such as the Server, Cluster, and Application elements. These child elements may have children of their own. For example, the Server element includes the child elements WebServer, SSL and Log. The Application element includes the child elements EJBComponent and WebAppComponent. Each element has one or more configurable attributes. An attribute defined in config.dtd has a corresponding attribute in the configuration API. For example, the Server element has a ListenPort attribute, and likewise, the weblogic.management.configuration.ServerMBean has a ListenPort attribute. Configurable attributes are readable and writable, that is, ServerMBean has a getListenPort and a setListenPort method. To learn more about config.xml, see BEA WebLogic Server Configuration Reference
/applications | Stores the default Web Application for servers in the domain. If you select a template that includes WebLogic Server examples, then this directory also stores JAR and EAR files for individual examples. Note that if you select a template that installs WebLogic Server examples or the Petstore application, the examplesWebApp and petstore application files remain in the \samples\server\stage subdirectory of the WebLogic Server installation directory.
/logs | Stores log files for servers in the domain.
setEnv.cmd, setEnv.sh | Set environment variables for domain servers.
setExamplesEnv.cmd, setExamplesEnv.sh | Set environment variables for domains that include the WebLogic Server example applications.
startWebLogic.cmd, startWebLogic.sh | Start the Administration Server for a custom domain.
startManagedWebLogic.cmd, startManagedWebLogic.sh | Start a Managed Server in a custom domain.
startExamplesServer.cmd, startExamplesServer.sh | Start a server that hosts the WebLogic Server example applications.
startPetStore.cmd, startPetStore.sh | Start a server that hosts the Pet Store example applications.
demokey.pem, democert.pem | Provide sample SSL protocol support for servers in the domain.
Windows Start Menu Items | Provide Start menu support for starting domain servers in a Windows environment.

Understanding Configuration Wizard Templates

The templates available in the Configuration Wizard vary, based on which WebLogic Platform components are installed in your environment. This section describes the templates typically available in a WebLogic Server installation. If you have other WebLogic Platform components installed, other templates may be available in the Configuration Wizard. For information about other templates, see Configuration Wizard Template Reference.

The Configuration Wizard templates for WebLogic Server installations are organized into the following main categories:

- WLS Domain— These templates create a new domain that contains one server instance and no applications.

- WLS Examples—These templates create a new domain that contains one server instance. The server instance runs as an Administration Server and is configured to run the WebLogic Server example applications. This server is similar to the examplesServer created when you choose the Typical Install option in the WebLogic Server installation program.

- WLS Petstore—These templates create a new domain that contains one server instance. The server instance runs as an Administration Server and is configured to run the Pet Store sample application. This server is similar to the petstoreServer created with a typical WebLogic Server installation.

If you install other BEA products, the Configuration Wizard provides additional templates.

Within each template category, the Configuration Wizard offers several different domain configurations, which vary in terms of the number and type of server instances the new domain will contain The alternative configurations are:

- Single Server (Standalone Server)—This option creates a new domain with a single server that acts as the Administration Server and also hosts applications.

  This type of configuration is recommended for development or testing, not for a production environment. See Create a Domain with a Single Server Instance for instructions on creating a domain with a single server.

- Admin Server with Managed Server(s)—This option creates a new domain with an Administration Server and one or more Managed Servers.

  This type of configuration is recommended for production environments, as it provides a dedicated Administration Server, and Managed Servers to host applications. See Create a Domain with Administration Server and Stand-Alone Managed Servers for instructions on creating a domain with multiple servers.

- Admin Server with Clustered Managed Server(s)—This option creates a new domain with an Administration Server and multiple clustered Managed Servers.

  This type of configuration is recommended for production environments that require high availability and reliability. It provides a dedicated Administration Server, and a cluster of Managed Servers to support failover and load balancing for the applications it hosts. See Create a Domain with Administration Server and Clustered Managed Servers for instructions on creating a domain multiple servers arranged as a cluster.

- Managed Server (with owning Admin Server configuration)—This option creates startup scripts and other files required to run an existing Managed Server on a WebLogic Server host machine that is separate from the host on which the Administration Server runs.

  See Configure Support for Remote Managed Servers for more information.

Determine the Server Name and Listen Address

The Configuration Wizard prompts you to assign a name and identify the listen address for each server instance you create. The following sections describe important considerations related to setting the server name and listen address.

Server Name Considerations

Each server instance in your WebLogic environment must have a unique name, regardless of the domain or cluster in which it resides, or whether it is an Administration Server or a Managed Server.

Listen Address Considerations

The following table describes important considerations related to setting the listen address value.

If the Listen Address is set to . . . | Then, the following is true . . .
--- | ---
IP address or DNS name | To connect to the server instance, processes can specify either the IP address or the corresponding DNS name. Processes that specify localhost will fail to connect. You must update existing processes that use localhost to connect to the server instance. Connections that specify the IP address for the listen address and a secured port for the listen port must disable host name verification. Note: To resolve a DNS name to an IP address, Weblogic Server must be able to contact an appropriate DNS server or obtain the IP address mapping locally. Therefore, if you specify a DNS name for the listen address, you must either leave a port open long enough for the WebLogic Server instance to connect to a DNS server and cache its mapping or you must specify the IP address mapping in a local file. If you specify an IP address for ListenAddress and then a client request specifies a DNS name, WebLogic Server will attempt to resolve the DNS name, but if it cannot access DNS name mapping, the request will fail.
localhost | Processes must specify localhost to connect to the server instance. Only processes that reside on the machine that hosts the server instance (local processes) will be able to connect to the server instance. Remote (non-local) processes will not be able to connect to the server instance.
Undefined or Blank ("") | Processes can specify the IP address, DNS name, or localhost to connect to the server instance. Processes that specify localhost must reside on the machine that hosts the server instance. If the server instance must be accessible as localhost (for instance, if you have administrative scripts that connect to localhost), and must also be accessible by remote processes, leave the listen address blank. Note: For WebLogic servers running on multi-homed Windows NT machines, you should not leave the listen address value undefined or blank. (Multi-homed machines are configured with multiple IP addresses.) Otherwise, the WebLogic Server reserves and listens on its port for each of the machine IP addresses. This precludes other servers from using the same port on the machine.

Using the Configuration Wizard

The following sections provide instructions for starting and using the Configuration Wizard.

Starting the Configuration Wizard

The WebLogic Server installation program provides the option to automatically start the Configuration Wizard when you select the Custom Install option during the installation. You can also start the Configuration Wizard at any time after installing WebLogic Server using either a GUI or a console (command-line) interface, as described below.

Starting in GUI Mode

Running the Configuration Wizard in GUI mode executes the Configuration Wizard program in a graphics environment that can run on Windows and some Unix systems.

To start the Configuration Wizard in GUI mode on a Windows platform, select the Run Configuration Wizard option from the BEA program group in the Windows Start Menu:

>     Start—>Programs—>BEA—>WebLogic Platform 7.0—>Domain Configuration Wizard

To start the Configuration Wizard in GUI mode on a UNIX platform (or from a Windows command prompt):

1. Log in to a Windows or UNIX system on which the WebLogic Server software is installed.

2. Open a command-line shell.

3. Go to the following directory: WL_HOME/common/bin

   where WL_HOME is the directory in which you installed WebLogic Server. For example:

   cd c:\bea\weblogic700\common\bin

4. Invoke the dmwiz.cmd or dmwiz.sh script.

If you try to start the Configuration Wizard on a system that cannot support the graphical display, the wizard automatically starts in console mode.

Starting in Console Mode

Running the Configuration Wizard in Console mode executes the Configuration Wizard program in a text-based environment. To start the Configuration Wizard in Console mode:

1. Log in to the target Windows or UNIX system.

2. Open a command-line shell.

3. Go to the following directory: WL_HOME/common/bin

   where WL_HOME is the directory in which you installed WebLogic Server. For example:

   cd ~/bea/weblogic700/common/bin

4. Invoke the dmwiz.cmd or dmwiz.sh script with the -mode=console argument. For example, in a bash shell on UNIX:

   . dmwiz.sh -mode=console

Create a Domain with Administration Server and Stand-Alone Managed Servers

To create a new domain with one or more Managed Servers and a standalone Administration Server:

1. Start the Configuration Wizard using the instructions in Starting the Configuration Wizard. The instructions that follow assume that you are running the Configuration Wizard in GUI mode.

   The Configuration Wizard displays the Choose Domain Type and Name screen.

2. Perform the following actions:

   - Select a Template: Select WLS Domain, WLS Examples, or WLS Petstore. See Understanding Configuration Wizard Templates for more information.

   - Name: Enter a domain name using alphanumeric characters. The Configuration Wizard uses the name you enter to create a domain subdirectory for the new domain.

     This field will not accept spaces. In addition, "Portal" cannot be used as a domain name.

3. Click the Next button to continue to the Choose Server Type screen.

4. Select the Admin Server with Managed Server(s) option and click Next. The Configuration Wizard displays the Choose Domain Location screen.

5. Enter a top-level directory to store your custom domain, or use the Browse button to select a directory. Click Next to move to the Configure Managed Servers in Admin Server screen.

6. To add a new Managed Server to the domain, click Add and fill in the fields of the Add Server dialog box as follows:

   - Server Name—Enter a server name using alphanumeric characters. This field will not accept spaces.

     See Server Name Considerations.

   - Listen Address—Enter an IP address for this server.

     See Listen Address Considerations.

   - Listen Port—Enter a numeric value for the listen port. The range is 1 to 65535.

7. Click Add on the Add Server dialog box to add the new Managed Server and return to the Configure Managed Servers in Admin Server screen.

   Note: If you make a mistake and want to edit or delete a server you added, select the server name and click the Edit or Delete button.

8. Repeat step 6 to add additional Managed Servers, or click Next to move to the Configure Admin Server screen.

9. Fill in the fields of the Configure Admin Server screen as follows:

   - Server Name: Enter a server name using alphanumeric characters. This field will not accept spaces.

     See Server Name Considerations.

   - Server Listen Address: Enter an IP address for this server.

     See Listen Address Considerations.

   - Server Listen Port: Enter a numeric value for the listen port. The range is 1 to 65535. The default port is 7001.

   - Server SSL Listen Port: Enter a numeric value for SSL listening port for your security configuration. The range is 1 to 65535. The default port is 7002.

10. Click Next to move to the Create System User and Password screen.

11. Enter the user name and password required to boot and connect to the Administration Server you configured. Click Next.

12. For Windows systems, the Configuration Wizard prompts you to install the Administration Server as a Windows service. Select Yes if you want to run the server as a Windows service, or No to start the server from the command-line or windows Start menu. Click Next to continue.

13. For Windows systems, the Configuration Wizard prompts you to install the domain in the Windows Start menu. Select Yes if you want to install the server start scripts under the start menu. Click Next to move to the Configuration Summary screen.

14. Verify the new domain and server configuration in the Configuration Summary screen. If you want to edit your selections, click the back button to return to the correct screen. Otherwise, click Create to create the new domain with the servers you specified.

Create a Domain with Administration Server and Clustered Managed Servers

For guidelines on supplying addressing information for a cluster and its members, see "Identify Names and Addresses" in Using WebLogic Server Clusters.

To create a new domain with a cluster of Managed Servers and a standalone Administration Server:

1. Start the Configuration Wizard using the instructions in Starting the Configuration Wizard. The instructions that follow assume that you are running the Configuration Wizard in GUI mode.

   The Configuration Wizard displays the Choose Domain Type and Name screen.

2. Perform the following actions:

   - Select a Template: Select WLS Domain, WLS Examples, or WLS Petstore. See Understanding Configuration Wizard Templates for more information.

   - Name: Enter a domain name using alphanumeric characters. The Configuration Wizard uses the name you enter to create a domain subdirectory for the new domain.

     This field will not accept spaces. In addition, "Portal" cannot be used as a domain name.

3. Click the Next button to continue to the Choose Server Type screen.

4. Select the Admin Server with Clustered Managed Server(s) option and click Next. The Configuration Wizard displays the Choose Domain Location screen.

5. Enter a top-level directory to store your custom domain, or use the Browse button to select a directory. Click Next to move to the Configure Clustered Servers screen.

6. To add a new Managed Server to the domain, click Add and fill in the fields of the Add Server dialog box as follows:

   Server Name: Enter a server name using alphanumeric characters. This field will not accept spaces.

   See Server Name Considerations.

   - Listen Address: Enter an IP address for this server.

     See Listen Address Considerations.

   - Listen Port: Enter a numeric value for the listen port. The range is 1 to 65535.

7. Click Add on the Add Server dialog box to add the new Managed Server and return to the Configure Managed Servers in Admin Server screen.

   Note: If you make a mistake and want to edit or delete a server you added, select the server name and click the Edit or Delete button.

8. Repeat step 6 to add additional Managed Servers, or click Next to move to the Configure Cluster screen.

9. Enter the following information in the Configure Cluster screen:

   - Cluster Name: Enter a cluster name using alphanumeric characters. This field will not accept spaces. The default is mycluster.

     The name of the cluster must be unique among all configuration component names within the domain.

   - Cluster MultiCast Address: Enter a multicast address for the cluster. A multicast address is an IP address in the range from 224.0.0.0 to 239.255.255.255.

   - Cluster MultiCast Port: Enter a numeric value for the multicast port. The range of values is up to 65535.

   - Cluster Address: Enter the address that clients use to connect to this cluster. For production use, enter a DNS name that maps to the individual IP addresses of the Managed Servers in the cluster. For testing or development purposes, use a comma-separated list of the IP addresses and ports assigned to the Managed Servers (this is the default entry).

10. Click Next to move to the Configure Admin Server (with Cluster) screen.

11. Fill in the fields of the Configure Admin Server (with Cluster) screen as follows:

    - Server Name: Enter a server name using alphanumeric characters. This field will not accept spaces.

      See Server Name Considerations.

    - Server Listen Address: Enter an IP address for this server.

      See Listen Address Considerations.

    - Server Listen Port: Enter a numeric value for the listen port. The range is 1 to 65535. The default port is 7001.

    - Server SSL Listen Port: Enter a numeric value for SSL listening port for your security configuration. The range is 1 to 65535. The default port is 7002.

12. Click Next to move to the Create System User and Password screen.

13. Enter the user name and password required to boot and connect to the Administration Server you configured. Click Next.

14. For Windows systems, the Configuration Wizard prompts you to install the Administration Server as a Windows service. Select Yes if you want to run the server as a Windows service, or No to start the server from the command-line or windows Start menu. Click Next to continue.

15. For Windows systems, the Configuration Wizard prompts you to install the domain in the Windows Start menu. Select Yes if you want to install the server start scripts under the start menu. Click Next to move to the Configuration Summary screen.

16. Verify the new domain and server configuration in the Configuration Summary screen. If you want to edit your selections, click the back button to return to the correct screen. Otherwise, click Create to create the new domain with the servers you specified.

Create a Domain with a Single Server Instance

To create a new domain with a single WebLogic Server instance that acts as both the Administration Server and application host server:

1. Start the Configuration Wizard using the instructions in Starting the Configuration Wizard. The instructions that follow assume that you are running the Configuration Wizard in GUI mode.

   The Configuration Wizard displays the Choose Domain Type and Name screen.

2. Perform the following actions:

   - Select a Template: Select WLS Domain, WLS Examples, or WLS Petstore. See Understanding Configuration Wizard Templates for more information.

   - Name: Enter a domain name using alphanumeric characters. The Configuration Wizard uses the name you enter to create a domain subdirectory for the new domain.

     This field will not accept spaces. In addition, "Portal" cannot be used as a domain name.

3. Click the Next button to continue to the Choose Server Type screen.

4. Select the Single Server (Standalone Server) option and click Next. The Configuration Wizard displays the Choose Domain Location screen.

5. Enter a top-level directory to store your custom domain, or use the Browse button to select a directory. Click Next to move to the Configure Single Server screen.

6. Fill in the fields of the Configure Single Server screen as follows:

   - Server Name: Enter a server name using alphanumeric characters. This field will not accept spaces.

     See Server Name Considerations.

   - Server Listen Address: Enter an IP address for this Server.

     See Listen Address Considerations.

   - Server Listen Port: Enter a numeric value for the listen port. The range of values is 1 to 65535. The default port is 7001.

   - Server SSL Listen Port: Enter a numeric value for SSL listen port. The range of values is 1 to 65535. The default port is 7002.

7. Click Next to move to the Create System User and Password screen.

8. Enter the user name and password required to boot and connect to the server you configured. Click Next.

9. For Windows systems, the Configuration Wizard prompts you to install the Administration Server as a Windows service. Select Yes if you want to run the server as a Windows service, or No to start the server from the command-line or windows Start menu. Click Next to continue.

10. For Windows systems, the Configuration Wizard prompts you to install the domain in the Windows Start menu. Select Yes if you want to install the server start script under the Start menu. Click Next to move to the Configuration Summary screen.

11. Verify the new domain and server configuration in the Configuration Summary screen. If you want to edit your selections, click the back button to return to the correct screen. Otherwise, click Create to create the new domain with the standalone server you specified.

Configure Support for Remote Managed Servers

To enhance performance and reliability within a WebLogic domain, you can run WebLogic Server instances on different computers (machines). For example, you can run the Administration Server on a computer named MachineA, a Managed Server named MS1 on MachineB, and a Managed Server named MS2 on MachineC. To run a WebLogic Server instance on a machine, you must:

- Install the WebLogic Server software.

- For an Administration Server, use the Configuration Wizard to create a config.xml file and startup script.

- For a Managed Server, use the Configuration Wizard to create a startup script that specifies the location of the Administration Server. When the Managed Server starts, it refers to the Administration Server for its configuration data.

  For information on configuring a Managed Server to start when the Administration Server is unavailable, refer to Starting a Managed Server When the Administration Server Is Not Accessible.

For each Managed Server that you want to run on a WebLogic Server host that is separate from the host on which the domain's Administration Server runs:

1. Make sure the domain's config.xml file already specifies configuration data for the Managed Server.

   You can specify this information when you create a domain (see Create a Domain with Administration Server and Stand-Alone Managed Servers or Create a Domain with Administration Server and Clustered Managed Servers) or after you have created a domain (see "Adding a Server to the Domain" in the Administration Console Help).

2. Log in to the machine that will run the new Managed Server.

   Note that this machine must have access to the WebLogic Server installation files in order to run the Configuration Wizard executable.

3. Start the Configuration Wizard using the instructions in Starting the Configuration Wizard. The instructions that follow assume that you are running the Configuration Wizard in GUI mode.

   The Configuration Wizard displays the Choose Domain Type and Name screen.

4. Perform the following actions:

   - Select a Template: Select the template that was used to create the domain in which you have already defined the Managed Server.

   - Name: Enter the name of the domain in which you have already defined the Managed Server.

     Click the Next button to move to the Choose Server Type screen.

5. Select the Managed Server (with owning Admin Server configuration) option and click Next. The Configuration Wizard displays the Choose Domain Location screen.

6. Enter the name of the directory where you want to store the start scripts and demo security files for the Managed Server, or use the Browse button to select a directory. Click Next to move to the Configure Administrative Server Connection screen.

7. Provide information that the Managed Server uses to connect to the Administration Server:

   - Admin Server Listen Address: Enter the DNS name or the IP address of the computer that hosts the Administration Server.

   - Admin Server Listen Port: Enter the port number on which you configured the Administration Server to listen for non-SSL requests.

   - Admin Server SSL Listen Port: Enter the port number on which you configured the Administration Server to listen for SSL requests.

   - Managed Server Name: Enter the name of the Managed Server (this name must match the name that is specified for the Managed Server in the domain's config.xml file).

8. Click Next to move to the Configure Standalone/Administrative Server page.

9. Ignore all values on the Configure Standalone/Administrative Server page. This page is not used to configure support for remote Managed Servers.

10. Click Next to move to the Create System User and Password screen.

11. Enter the user name and password required to boot and connect to the server you configured. Click Next.

12. For Windows systems, depending on the template that you chose, the Configuration Wizard prompts you to install the new server as a Windows service. Select Yes if you want to run the server as a Windows service, or No to start the server from the command-line or windows Start menu. Click Next to continue.

13. For Windows systems, depending on the template that you chose, the Configuration Wizard prompts you to install the domain in the Windows Start menu. Select Yes if you want to install the server start script under the Start menu. Click Next to move to the Configuration Summary screen.

14. Verify the new domain and server configuration in the Configuration Summary screen. If you want to edit your selections, click the back button to return to the correct screen. Otherwise, click Create to create the startup scripts.

To start the Managed Server instance:

1. Start the domain's Administration Server on the WebLogic Server host that you specified in the Admin Server Name or IP field of the wizard (step 7. in Configure Support for Remote Managed Servers).

2. Log in to the remote host and invoke the following script:

   domain-name/startManagedWebLogic.cmd (Windows)
   domain-name/startManagedWebLogic.sh (UNIX)

   where domain-name is the directory you specified in step 6. in Configure Support for Remote Managed Servers.