Oracle® Fusion Middleware ?· Oracle® Fusion Middleware Oracle WebLogic Scripting Tool 11g Release…

Download Oracle® Fusion Middleware ?· Oracle® Fusion Middleware Oracle WebLogic Scripting Tool 11g Release…

Post on 10-Nov-2018

212 views

Category:

Documents

0 download

Embed Size (px)

TRANSCRIPT

  • Oracle Fusion MiddlewareOracle WebLogic Scripting Tool

    11g Release 1 (10.3.6)

    E13715-05

    November 2011

    This document describes the WebLogic Scripting Tool (WLST). It explains how you use the WLST command-line scripting interface to configure, manage, and persist changes to WebLogic Server instances and WebLogic domains, and monitor and manage server run-time events.

  • Oracle Fusion Middleware Oracle WebLogic Scripting Tool, 11g Release 1 (10.3.6)

    E13715-05

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

    This software and related documentation are provided under a license agreement containing restrictions on use and disclosure and are protected by intellectual property laws. Except as expressly permitted in your license agreement or allowed by law, you may not use, copy, reproduce, translate, broadcast, modify, license, transmit, distribute, exhibit, perform, publish, or display any part, in any form, or by any means. Reverse engineering, disassembly, or decompilation of this software, unless required by law for interoperability, is prohibited.

    The information contained herein is subject to change without notice and is not warranted to be error-free. If you find any errors, please report them to us in writing.

    If this is software or related documentation that is delivered to the U.S. Government or anyone licensing it on behalf of the U.S. Government, the following notice is applicable:

    U.S. GOVERNMENT RIGHTS Programs, software, databases, and related documentation and technical data delivered to U.S. Government customers are "commercial computer software" or "commercial technical data" pursuant to the applicable Federal Acquisition Regulation and agency-specific supplemental regulations. As such, the use, duplication, disclosure, modification, and adaptation shall be subject to the restrictions and license terms set forth in the applicable Government contract, and, to the extent applicable by the terms of the Government contract, the additional rights set forth in FAR 52.227-19, Commercial Computer Software License (December 2007). Oracle America, Inc., 500 Oracle Parkway, Redwood City, CA 94065.

    This software or hardware is developed for general use in a variety of information management applications. It is not developed or intended for use in any inherently dangerous applications, including applications that may create a risk of personal injury. If you use this software or hardware in dangerous applications, then you shall be responsible to take all appropriate fail-safe, backup, redundancy, and other measures to ensure its safe use. Oracle Corporation and its affiliates disclaim any liability for any damages caused by use of this software or hardware in dangerous applications.

    Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners.

    Intel and Intel Xeon are trademarks or registered trademarks of Intel Corporation. All SPARC trademarks are used under license and are trademarks or registered trademarks of SPARC International, Inc. AMD, Opteron, the AMD logo, and the AMD Opteron logo are trademarks or registered trademarks of Advanced Micro Devices. UNIX is a registered trademark of The Open Group.

    This software or hardware and documentation may provide access to or information on content, products, and services from third parties. Oracle Corporation and its affiliates are not responsible for and expressly disclaim all warranties of any kind with respect to third-party content, products, and services. Oracle Corporation and its affiliates will not be responsible for any loss, costs, or damages incurred due to your access to or use of third-party content, products, or services.

  • iii

    Contents

    Preface ................................................................................................................................................................ vii

    Documentation Accessibility .................................................................................................................... viiConventions ................................................................................................................................................ vii

    1 Introduction and Roadmap

    1.1 Document Scope and Audience................................................................................................ 1-11.2 Guide to This Document............................................................................................................ 1-11.3 Related Documentation.............................................................................................................. 1-21.4 WLST Sample Scripts ................................................................................................................. 1-21.4.1 WLST Online Sample Scripts ............................................................................................. 1-31.4.2 WLST Offline Sample Scripts............................................................................................. 1-31.5 New and Changed WLST Features in This Release............................................................... 1-5

    2 Using the WebLogic Scripting Tool

    2.1 Using WLST Online or Offline ................................................................................................. 2-12.1.1 Using WLST Online............................................................................................................. 2-12.1.2 Using WLST Offline ............................................................................................................ 2-22.2 Interactive Mode, Script Mode, and Embedded Mode ......................................................... 2-22.2.1 Interactive Mode .................................................................................................................. 2-22.2.2 Script Mode........................................................................................................................... 2-32.2.3 Embedded Mode.................................................................................................................. 2-32.3 Security for WLST....................................................................................................................... 2-42.3.1 Securing the WLST Connection......................................................................................... 2-42.3.2 Securing Access to Configuration Data............................................................................ 2-52.3.2.1 Securing Access from WLST Online.......................................................................... 2-52.3.2.2 Writing and Reading Encrypted Configuration Values ......................................... 2-62.3.3 Securing Access to Security Data ...................................................................................... 2-72.4 Main Steps for Using WLST in Interactive or Script Mode .................................................. 2-82.4.1 Invoking WLST .................................................................................................................... 2-82.4.1.1 Invoking WLST Using Provided Shell Scripts ......................................................... 2-82.4.1.2 Invoking WLST Using the java Command............................................................... 2-92.4.1.3 Running Scripts.......................................................................................................... 2-112.4.1.4 Invoking WLST From the Start Menu .................................................................... 2-122.4.2 Exiting WLST..................................................................................................................... 2-122.4.3 Syntax for WLST Commands.......................................................................................... 2-12

  • iv

    2.4.4 Considerations When Invoking Multiple WLST Instances ........................................ 2-122.5 Redirecting Error and Debug Output to a File .................................................................... 2-132.6 Getting Help ............................................................................................................................. 2-132.7 Running WLST from Ant........................................................................................................ 2-132.7.1 Parameters ......................................................................................................................... 2-142.7.2 Parameters Specified as Nested Elements..................................................................... 2-142.7.2.1 script ............................................................................................................................ 2-142.7.2.2 classpath...................................................................................................................... 2-142.7.3 Examples ............................................................................................................................ 2-152.7.3.1 Example 1.................................................................................................................... 2-152.7.3.2 Example 2.................................................................................................................... 2-152.7.3.3 Example 3.................................................................................................................... 2-162.8 Importing WLST as a Jython Module ................................................................................... 2-162.9 Customizing WLST.................................................................................................................. 2-172.9.1 Adding Integrated Help for Custom Commands........................................................ 2-182.9.2 sample.py Sample Script ................................................................................................. 2-202.9.3 wlstLibSample.py Sample Script.................................................................................... 2-20

    3 Creating WebLogic Domains Using WLST Offline

    3.1 Creating and Using a Domain Template (Offline)................................................................. 3-13.1.1 Browsing Information About the Configuration Hierarchy (Offline) ......................... 3-23.1.2 Editing a WebLogic Domain (Offline) .............................................................................. 3-33.2 Alternative: Using the configToScript Command.................................................................. 3-43.3 Considerations for Clusters, JDBC, and JMS Resources ....................................................... 3-5

    4 Managing the Server Life Cycle

    4.1 Using WLST and Node Manager to Manage Servers............................................................ 4-14.1.1 Using Node Manager to Start Servers on a Machine ..................................................... 4-34.1.2 Using Node Manager to Start Managed Servers in a WebLogic Domain or Cluster 4-44.2 Starting and Managing Servers Without Node Manager ..................................................... 4-54.2.1 Starting an Administration Server Without Node Manager......................................... 4-54.2.2 Managing Server State Without Node Manager............................................................. 4-6

    5 Navigating MBeans (WLST Online)

    5.1 Navigating and Interrogating MBeans .................................................................................... 5-15.1.1 Changing the Current Management Object..................................................................... 5-25.1.2 Navigating and Displaying Configuration MBeans Example ...................................... 5-35.2 Browsing Runtime MBeans ....................................................................................................... 5-55.2.1 Navigating and Displaying Runtime MBeans Example ................................................ 5-55.3 Navigating Among MBean Hierarchies .................................................................................. 5-75.4 Finding MBeans and Attributes................................................................................................ 5-85.5 Accessing Other WebLogic MBeans and Custom MBeans................................................... 5-85.5.1 Accessing Custom MBeans in the Domain Runtime MBean Server ............................ 5-9

    6 Configuring Existing WebLogic Domains

    6.1 Using WLST Online to Update an Existing WebLogic Domain .......................................... 6-1

  • v

    6.1.1 Tracking Configuration Changes ...................................................................................... 6-36.1.2 Undoing or Canceling Changes......................................................................................... 6-46.1.3 Additional Operations and Attributes for Change Management ................................ 6-46.2 Using WLST Offline to Update an Existing WebLogic Domain .......................................... 6-56.3 Managing Security Data (WLST Online)................................................................................. 6-56.3.1 Determining If You Need to Access the Edit Hierarchy................................................ 6-66.3.2 Creating a User..................................................................................................................... 6-66.3.3 Adding a User to a Group .................................................................................................. 6-76.3.4 Verifying Whether a User Is a Member of a Group........................................................ 6-76.3.5 Listing Groups to Which a User Belongs ......................................................................... 6-86.3.6 Listing Users and Groups in a Security Realm................................................................ 6-86.3.7 Changing a Password ........................................................................................................ 6-96.3.8 Protecting User Accounts in a Security Realm............................................................. 6-106.3.8.1 Set Consecutive Invalid Login Attempts ............................................................... 6-106.3.8.2 Unlock a User Account ............................................................................................. 6-116.3.9 Configuring Additional LDAP Authentication Providers ......................................... 6-116.4 Deploying Applications .......................................................................................................... 6-126.4.1 Using WLST Online to Deploy Applications...

Recommended

View more >