Before You Begin
This tutorial shows you how to create, configure, and start Oracle WebLogic Server Managed Servers.
Background
This tutorial is part of the Oracle WebLogic Server 12c series and assumes that you have completed this tutorial:
A WebLogic Server domain always has exactly one Administration Server. This special instance of WebLogic Server is responsible for the configuration of the entire domain. Other servers in the domain are called Managed Servers and they are typically the servers on which you run your applications. A domain may contain any number of Managed Servers.
This tutorial covers creating and configuring Oracle WebLogic Server Managed Servers by using the Oracle WebLogic Server Administration Console. It also shows you how to start Managed Servers from the command line using the domain start script.
What Do You Need?
- An installation of Oracle WebLogic Server 12c. See http://www.oracle.com/technetwork/middleware/weblogic/downloads/index.html.
- This tutorial uses an instance of WebLogic Server installed
in
/u01/app/fmw
. - A properly configured Oracle WebLogic Server domain containing an Administration Server and the following settings:
- Domain directory:
/u01/domains/ExampleDomain
- Administration Server Listen Address and Port Number:
localhost:7001
- Domain administrator credentials: The user name and password you specified when you created the domain.
Creating
Managed Servers
To create Managed Servers in the domain:
- If the Administration Server of the domain is not already
running, start it.
- Open a terminal window and navigate to the domain directory:
$ cd /u01/domains/ExampleDomain
- In the domain directory, enter:
- At the prompt, enter the credentials of the domain administrator.
- Examine the terminal output and wait for the
Administration Server to reach the
RUNNING
state. - After the Administration Server is running, access the WebLogic Server Administration Console.
- Open a web browser and enter the URL:
- On the Welcome screen, enter the user name and password that you specified when you created the domain, and then click Login. The home page of the Administration Console is displayed.
- In the left pane of the Console, under Domain Structure, expand Environment, and then select Servers.
- On the Summary of Servers page, you can view all the servers defined in the domain.
- To create Managed Servers, or change anything in the domain configuration, you must first lock the domain configuration (to prevent other accounts from making changes during your edit session) and enable an edit session.
- In the Change Center, click Lock & Edit.
- In the Servers table, click New.
- Enter the required properties for a new server:
- Server Name: server1
- Server Listen Port: 7003
- Click Finish.
- The Console displays the message:
Server created successfully
. - Repeat step 5 to create server2, listen port 7005, and server3, listen port 7007.
- In the Change Center, click Activate Changes.
- The Console displays the message:
All changes have been activated. No restarts are necessary
. - The Administration Console updates the domain configuration with the new server configuration data.
$ ./startWebLogic.sh
<Aug 23, 2018 9:57:34,722 AM EDT> <Notice> <WebLogicServer> <BEA-000360> <The server started in RUNNING mode.>
<Aug 23, 2018 9:57:34,817 AM EDT> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to RUNNING.>
http://localhost:7001/console
Configuring
Managed Servers
To configure Managed Servers:
- On the Summary of Servers page, select server1.
- The settings for server1 are displayed.
- To modify the settings for server1, you must first lock the domain configuration and enable an edit session.
- In the Change Center, click Lock & Edit.
- Under Settings for server1, select Logging, and then General.
- Change the rotation file size to 7500. This increases the size of the server log files before a new log file is created.
- Click Save.
- The Console displays the following message:
Settings updated successfully
. - Also increase the log file rotation size of server2 by performing the following steps:
- Under Domain Structure, expand Environment, and then select Servers.
- In the Servers table, select server2.
- Under Settings for server2, select Logging, and then General.
- Change the rotation file size to 7500.
- Click Save.
- In the Change Center, click Activate Changes.
- The Console displays the message:
All changes have been activated. No restarts are necessary
. - The Administration Console updates the domain configuration with the new server configuration data.
Starting
Managed Servers
To start Managed Servers:
- Run the Managed Server start script.
- Open a terminal window and navigate to the
bin
directory under your domain directory. In this tutorial, the domain directory is:/u01/domains/ExampleDomain
- Enter:
startManagedWebLogic.sh
- This command takes two arguments: the name of the Managed Server that you want to start and the URL of the Administration Server
- In this tutorial, the values for those arguments are:
server1
andhttp://localhost:7001
- At the prompt, enter the administrator user name and password. NOTE: The password is not displayed.
- Wait for the following terminal output messages:
- Repeat steps 1 and 2 to start server2.
- In the Administration Console:
- If you need to log in again, do so.
- Under Domain Structure, expand Environment, and then select Servers.
- In the Servers table, examine server1 and server2. Both
should show their state as
RUNNING
.
$ cd /u01/domains/ExampleDomain/bin $ ./startManagedWebLogic.sh server1 http://localhost:7001
<Aug 23, 2018 9:57:34,722 AM EDT> <Notice> <WebLogicServer> <BEA-000360> <The server started in RUNNING mode.>
<Aug 23, 2018 9:57:34,817 AM EDT> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to RUNNING.>
Next
Steps
The WebLogic Server 12c collection contains a number of additional tutorials, covering a variety of topics. See the WebLogic Server 12c collection here for additional topics and content.