• No results found

WebLogic Server Administration

N/A
N/A
Protected

Academic year: 2021

Share "WebLogic Server Administration"

Copied!
23
0
0

Loading.... (view fulltext now)

Full text

(1)

ORACLE PRODUCT

LOGO

1 Copyright © 2011, Oracle and/or its affiliates. All rights reserved.

WebLogic Server Administration

Roger Freixa

(2)

WebLogic

Concepts

2 Copyright © 2011, Oracle and/or its affiliates. All rights reserved.

(3)

Key Concepts

WebLogic Terminology

Domain - group of instances and clusters under

unified control

Administration Server - central configuration

controller for the domain

Managed Server - Instance that hosts

applications and required resources

Cluster - group of managed servers to provide

increased scalability and reliability

Node Manager - per-machine process used to

(4)

Key Concepts

(5)

Key Concepts

Clusters

Can have zero or more clusters in a domain

Clusters can have one or more servers

Some servers in a domain may not belong to any cluster

(6)

Key Concepts

(7)

Installation

& Configuration

7 Copyright © 2011, Oracle and/or its affiliates. All rights reserved.

(8)

Installation (add ZIP installer)

Installer

Different installers

Net (selective download) installer, Package (full) installer, Generic (jar, Unix) installer

One installer - different install modes

Graphical mode, Character mode, Silent (scripted) mode

8

Custom/Selective Installation



Can choose installation of core

application server only



Optionally add Admin Console,

(9)

Installation

Install Specifics

Middleware Home (formerly “BEA Home”)

• To store one or more installed products (eg. WLS, WLI, WLP, SOA Suite) • Traditionally c:\Oracle\Middlware or /opt/oracle/middleware

Recommendation: Use separate MW homes for separate products

WebLogic Home

• To store installed WebLogic product, containing all the WebLogic library JARs, executables,

9

• To store installed WebLogic product, containing all the WebLogic library JARs, executables, tools, licence info, examples and scripts

Usually a directory underneath MW home, eg.: c:\Oracle\Middleware\wlserver_10.3 or

/opt/oracle/middleware/wlserver_10.3

Neither MW nor WebLogic Home should be used to store configuration of

Domains

(10)

Domain Configuration

Domain

Reminder: Collection of servers and clusters managed centrally

• 1 Admin Server per Domain for centralised administration

• Domain configuration stored locally to the Admin Server (see <domain>/config/config.xml)

• Config is 'pushed out' on demand by Admin Server to Managed Servers

Options to Create a Domain

10

Options to Create a Domain

Domain Configuration Wizard

WebLogic Scripting Tool (WLST) in Offline mode

(both can use Domain Templates to provide a 'pre-canned' outline structure)

Additional Options to Modify an Existing Domain *

Admin Console

WLST Online mode

(11)

Domain Configuration

WebLogic Domain Structure

(12)

Domain Configuration

Domain Configuration Wizard

Graphical or Character mode

Silent mode no longer supported –

use WLST instead (far more

flexible)

Configure, servers, clusters,

addresses, ports, machines,

data-12

addresses, ports, machines,

data-sources, JMS modules and many

others

Default templates provided (eg.

Basic WLS Domain Template) or

choose own custom template

(13)

Administration

13

(14)

Server Start

Many Options

Java Node Manager (Best Option for HA)

Use Admin Console | Control | Server Start tools (except for Admin Server) Use WLST based Node Manager nmStart() function

• Server/JVM start-up parameters obtained from Domain Config (config.xml) • Automatic restart of failed servers

Supplied Command Line Scripts

14

Supplied Command Line Scripts

Admin Server: <domain>/bin/startWebLogic.sh

Managed Server: <domain>/bin/startManagedWebLogic.sh MngdSrvr

t3://admin-host:adminport

• Server/JVM start-up parameters sourced from 'setDomainEnv.sh

Operating System Service

A 'Windows Service' configured using the WebLogic 'beasvc' toolCustom start/start/restart init.d script on Unix/Linux

(15)

Node Manager & WebLogic

Start/Stop WebLogic Managed Servers Remotely

Start/Stop servers remotely via:

• Admin Console

• JMX

• Command Shell

• ANT / WLST

Small 'agent' process running on

Two choices

Java Node Manager (more established)

Script (SSH) Node Manager

15

Small 'agent' process running on

host machine (Java NM)

Supports multiple domains

Looks after one or more WLS

instances on the physical machine

Server health monitoring

Automatic server re-start upon

(16)

Management

Domain Management

Runtime Management

• Performed directly or in-directly via JMX

• Most operations do not require restart

• Variety of tools

• Administration Console

• WLST (online mode)

• Oracle Enterprise Manager

16

• Oracle Enterprise Manager

• Java client (using JMX API)

• Third-party tools (eg. HP OpenView)

Build-time Management

• Domain Configuration Tool • WLST (offline mode)

• Only 'supported' way to automate the building of domains from scratch

(17)

Scripting

WebLogic Scripting Tool (WLST)

Command-line/scripting tools for WebLogic domains

Offline (not connected to live server - primarily for domain creation)

Online (connected to live server - primarily for runtime monitoring)

Interactive mode (a command shell)

Scripted mode (for automation)

Jython based

17

Jython based

Python code in JVM

WebLogic specific set of management

APIs

(18)

Scripting

The Value of WLST

It's a “must use” which most customers are using today

• Stable supported API for domain creation

• Easy access to WebLogic JMX MBeans

• Enables flexibility for generating dev/test/prod domain

• But beware: it has a learning curve (Jython, WLST APIs) Repeatable automated process for domain creation

18

Repeatable automated process for domain creation

• Typically property file driven

• Greatly reduces opportunity for manual errors

• Single command to create a complex domain

• Pays-off even for scripting domains for the development lifecycle of project (not just for test/prod)

(19)

Scripting

Some Common Command Examples

Start WLST in interactive mode

<wlshome>common/bin/wlst.sh

List all available commands/functions

help()

Connect to a Admin Server running on local machine

connect('weblogic', 'weblogic', 't3://localhost:7001')

19

connect('weblogic', 'weblogic', 't3://localhost:7001')

Connect to the Runtime Server Tree

serverRuntime()

List attributes and child objects of current MBean

ls()

Move to the 'JMS Runtime' child object

(20)

WLST Script Recording

Learn WLST by Using the Admin Console

Make configuration

changes using the

admin console

See the

corresponding WLST

Create a library of

20

Create a library of

WLST scripts for

commands you use

most frequently

Keep a running log of

changes to your

(21)

Join the Middleware Community

Twitter

twitter.com/OracleMiddle

Facebook

facebook.com/FusionMiddleware

LinkedIn

Oracle Fusion Middleware

21 Copyright © 2011, Oracle and/or its affiliates. All rights reserved.

Oracle.com/Middleware

Oracle Fusion Middleware

Oracle’s Data Integration blog

(22)
(23)

References

Related documents