BEA Weblogic Server System
Administration
Module 3 – Basic Weblogic Server Administration
Basic Weblogic Server Administration
At the end of this module you will be able
• Configure a new domain
• Use the administration console to configure
server properties
• Use weblogic.Admin to configure server
properties
• Manage server logs
• Monitor server activity
Road Map
1. Configure a Domain
– Domain configuration templates
– Domain Configuration Wizard
2. Console Administration
3. Command-Line Administration
4. Logs and Monitoring
Configure a domain
• After installing Weblogic Server (WLS),
configure a WLS domain on which to develop
and deploy applications
• When you create a domain, you define a
collection of resources, such as these:
– Administration and Manages servers
– Clusters
– Database connections
– Security services
• To create and configure WLS domain, you use the
configuration wizard.
Domain Configuration Template…
• A domain configuration template provides
predefined domain resources that you can:
– Use, as-is
– Modify, to meet your requirements
• You create domains using the configuration
wizard and domain configuration templates.
• The configuration wizard includes several
templates, and you can create your own.
Start the Configuration Wizard
• Scripts are stored en the
<WL_HOME>/common/bin directory.
• In graphical mode, start the wizard in one of
these ways:
– Windows Start Menu
– Windows: config.cmd
– Unix: sh config.sh
• In console mode, start the wizard in one of these
ways:
– Windows: config.cmd –mode=console
– Unix: sh config.sh –mode=console
Create a Domain with the Configuration
Wizard…
…Create a Domain with the Configuration
Wizard
Specify Administration Server Settings
Create a Managed Server
Create a Cluster
Create a Proxy Server
Create a Machine
Assign Servers
Create and Target Services
Specify Login Credentials
Specify Server Start-up Details
Select a Mode and a JVM
Create a Domain with the Configuration Wizard
Key Domain Directories and Files
Directories and Files Description
Default location for user domains
Root of a domain
Administration server logs
Application auto-deployment
Domain configuration backups
Managed servers logs directory
Boot identity file (administrator login)
Domain configuration
Starts a managed server
Start the administration server
Domain-wide log
Configuration Repository
• The config.xml file represents the
configuration repository for a domain.
• The configuration repository holds
information about servers, machines,
clusters and other domain-wide
configuration settings.
• This file is modified when changes are
made to the domain’s configuration
Start Weblogic Server
• To start WebLogic Server from the
command line, do one of the folowing:
– Run the weblogic.Server class
– Run the pre-built domain command
scripts
• To start the administration server, run
one of the following:
– startWebLogic.cmd (Windows)
– startWebLogic.sh (Unix)
Start a Managed Server
• To start a managed server, run one of the
following:
– startManagedWebLogic.cmd <serverName>
<adminServer> (Windows)
– startManagedWebLogic.cmd <serverName>
<adminServer> (Unix)
Starting a managed server in Windows:
startManagedWebLogic myServer http://myAdminServer:7001
Section Review
• In this section we learned how to:
– Create a domain with the Configuration
Wizard
– Perform basic WebLogic Server
administrationm taks
Lab Exercise 3!!!
• Configure a domain
– In this lab you are going to setup a new Domain and
Start WLS
– Refer to the lab guide for more details.
– Ask the instructor for any clarification.
– The instructor will determine the stop time.
Road Map
1. Configure a Domain
2. Console Administration
– The WebLogic Server Administration Console
– Basic properties of the Console
– Symbols displayed in the Console
3. Command-Line Administration
4. Logs and Monitoring
The Administration Console
• The administration (admin) console is a Web
application for managing WebLogic Server.
• Use the admin console to:
– Configure attributes of resources
– Deploy applications or components
– Monitor resource usage
– View log messages
– Start and shutdown servers, or perform other
management actions
• The admin console uses the JMX API
Starting the Administration Console
• After starting the administration server, you can
start the console in a browser .
• Access requires the WebLogic domain
administrator login.
Console Login
The Administration Console
Setting Basic Properties
Shutting Down a Server
Advanced Console Options…
• The WebLogic Server administration console
hides options that are used infrequently.
• To display or hide the Advanced Options
display, click the Show/Hide toggle link.
…Advanced Console Options
Automatic config.xml Archiving…
• The config.xml file is in the root directory of the
domain.
• You can set the number of versions to archive in
the admin console
…Automatic config.xml Archiving
• After a successful boot, the admin server backs
up the configuration file.
• It stores a copy of config.xml.booted in the root
directory of the domain.
• If the configuration repository becomes
corrupted, the file can be used to recover the
domain.
• Just before the admin server parses the
configuration repository, it backs up the
configuration file.
• It stores config.xml.original.
config.xml.original
Server State Diagram
Section Review
• In this section, we learned how to:
– Start the Administration Console
– Configure properties in the admin console
– Shut down servers in the administration
console
Lab Exercise 4!!!
• Using the Administration Console
– In this lab you will configure and stop WLS using the
Console.
– Refer to the lab guide for more details.
– Ask the instructor for any clarification.
– The instructor will determine the stop time.
Road Map
1. Configure a Domain
2. Console Administration
3. Command-Line Administration
– weblogic.Admin
4. Logs and Monitoring
The weblogic.Admin utility
• Command-line tools are useful:
– For automating administration using scripts
– As an alternative to the Administration
Console
• The weblogic.Admin command provides a
command-line interface for performing remote
system administration functions.
Some weblogic.Admin commands…
Command Description Syntax
Verifies that a WLS is ready java weblogic.Admin –url <URL>
PING to accept requests PING <count bytes>
Makes count connections and java weblogic.Admin –url <URL>
CONNECT returns the total time for CONNECT <count>
each roiund trip
List current set of Licensed java weblogic.Admin –url <URL>
LICENSES products for WLS instances LICENSES
List current version of java weblogic.Admin –url <URL>
VERSION installed products VERSION
Provides syntax and usage for java weblogic.Admin HELP
HELP commands <COMMAND>
Some weblogic.Admin commands…
Command Description Syntax
Starts a remote managed java weblogic.Admin ….. START
START WLS <targetServer>
Shuts down a WLS instance java weblogic.Admin ….
SHUTDOWN SHUTDOWN <targetServer>
Forces WLS instance shut java weblogic.Admin ….
FORCE
down FORCESHUTDOWN
SHUTDOWN
<targetServer>
Moves server from STANDBY java weblogic.Admin ….
RESUME to RUNNING state RESUME <targetServer>
All commands require:
-url <URL> -username <username> -password <password>
…Some weblogic.Admin commands
Command Description Syntax
Returns the state of the java weblogic.Admin … GETSTATE
GETSTATE WLS
Display log file java weblogic.Admin ….
SERVERLOG SERVERLOG <startTime>
<endTime>
Real-time snapshot of java weblogic.Admin ….
THREAD_DUMP WLS threads running THREAD_DUMP
Migrate JMS or JTA java weblogic.Admin …. MIGRATE –
service within a cluster jta -migratabletarget
MIGRATE
<servername> -destination
<servername>
List JDNI naming tree java weblogic.Admin …. LIST
LIST node bindings <context>
Run weblogic.Admin in Batch mode
• The –BATCHUPDATE parameter calls a text file
that contains weblogic.Admin commands.
• It lets you maintain sets of commands, centrally.
• It provides better performance than running each
command separately does.
To call weblogic.Admin commands in batch mode:
java weblogic.Admin –username weblogic –password weblogic
–url 127.0.0.1:7001 BATCHUPDATE –batchFile commands.txt
-batchCmdVerbose -continueOnError
Section Review
• In this section we discussed:
– Managing WebLogic Server from the command-line
Lab Exercise 5!!!
• Using Command-line Administration
– In this exercise you are going to gain
experience using the command line
administration utility.
– Refer to the lab guide for more details.
– Ask the instructor for any clarification.
– The instructor will determine the stop time.
Road Map
1. Configure a Domain
2. Console Administration
3. Command-Line Administration
4. Logs and Monitoring
– Using Domain Logs
– Monitoring managed Server Logs
– Monitoring Active Servers
Using Logs to Monitor Activity
• Logs can help you discover or determine:
– Frequently-accessed resources
– Activity, by day and time interval
– The IP addresses of users accessing the site
– Problems servicing requests
– Exception Messages from applications
– Failure of deployments
– Failure of one or more subsystems
Log Files
• A server log:
– Logs all server activity
– Is stored in serverName\<serverName>.log, by
default
– Is stored locally on the server
• A domain log:
– Logs all domain activity
– Is stored in <domainName>.log, by default
– Is stored on the administration server
• Each log is configured independently.
Configuring Server Logging
• Configure logging on the Logging tab:
Configuring the Domain Log
• The domain log records events that occur on any server and sub-
system.
Logging Services
Domain Log Filters
• Filters can be created to receive a subset of log
messages.
• Filters permit the selection of messages by:
– Subsystem and user id
– Severity: for example, only messages of a
selected severity or higher are forwarded to
the domain log
• Filters can be assigned to servers in a domain.
Creating Domain Log Filters
Assigning a Domain Log Filter
Other Logs
• A HTTP Access log.
– Logs all HTTP activity
– Can be configured for each server
– Is stored locally on the server
– Is stored in serverName\access.log, by default
– Is a text file and is enabled by default
• Transaction log:
– Logs all transaction activity
– Is a binary file
Configuring HTTP Access Logging
Monitor Running Servers
Customizing Views
Monitoring One Server
• To monitor one server: on server, select the
Monitoring tab.
Section Review
• In this section, we learned how to:
– Configure logs
– Monitor domains and servers
Module Review
• In this module we discussed:
– Configure a new domain
– Use the administration console to configure
server properties
– Use weblogic.Admin to configure server
properties
– Manage server logs
– Monitor server activity