---
title: "WAS6.1红皮书导读--第五章"
author: "enshiwzw"
date: "2010-05-06T08:48:12Z"
tags: ["IBM", "Tcl", "Websphere", "脚本", "配置管理"]
categories: ["企业架构"]
slug: "was6-1"
draft: false
lastmod: "2010-05-06T08:48:12Z"
id: 660024
url: "https://ibmtech.iteye.com/blog/660024"
---

标题：用脚本进行管理。

内容：

脚本管理概览

使用 wsadmin命令

使用 wsadmin命令进行一般操作

一般配置任务

如何创建wsadmin脚本

使用java编程进行管理    

 

 

 

 一，脚本管理概览

 

这个东西告诉我们啊，它之所以能实现是怎么做到的，原理是什么。。。如果想详细了解，请仔细查看开源的一个框架。名字叫BSF（Bean Scripting Framework）。

 

二，使用 wsadmin命令

wsadmin支持二种脚本：jacl、jython。WAS还提供工具在二者的脚本之间进行互相转换。在学习的时候，直接help一下这个命令，就可以看到它各种参数的作用。我们都知道，如果要实现灵活的加载一些东西，个性化一些配置，都会有相应的配置文件。wsadmin的配置文件是什么呢？在哪儿呢？找到&lt;was\_home&gt;/properties/wsadmin.properties。这个配置文件就是。对了，你还发现在各自的profiles下面也有wsadmin命令，没错。如果在这个目录下操作，作用的对象就是此profile。WAS类似的命令很多，以后不再说这一点了。地球人都知道的东西总说三道四不好吧。

 

三，使用 wsadmin命令进行一般操作

wsadmin命令都讨论半天了，好像还没有说它可以做什么呢。其实啊，看这个命令的名字都知道它是管理WAS的。是的，管理的命令都可以通过它来做到。不过还是罗列一下：不过第四小节本次就不细化了。

 *Starting and stopping the deployment manager*  
 *Starting and stopping nodes*  
 *Starting and stopping application servers*  
 *Starting, stopping, and viewing enterprise applications*  
 *Starting and stopping clusters*  
 *Generating the Web server plug-in configuration file*  
 *Enabling tracing for WebSphere components*

四，一般配置任务

五，如何创建wsadmin脚本

如何创建一个java程序呢？当然是用工具撒。选一个工具然后开始做吧。

六，使用java编程进行管理  

看下面的参考资料

These Web sites and URLs are also relevant as further information sources:  
WebSphere Application Server Information Center  
[http://www.ibm.com/software/webservers/appserv/was/library/](http://www.ibm.com/software/webservers/appserv/was/library/)  
See Scripting: Resources for learning  
MBeanInspector for WebSphere Application Server:  
[http://www.alphaworks.ibm.com/tech/mbeaninspector](http://www.alphaworks.ibm.com/tech/mbeaninspector)  
Sample Scripts for WebSphere Application Server Versions 5 and 6:  
[http://www.ibm.com/developerworks/websphere/library/samples/](http://www.ibm.com/developerworks/websphere/library/samples/)  
SampleScripts.html  
Tcl Developer Xchange  
[http://www.tcl.tk/](http://www.tcl.tk/)  
IBM WebSphere Developer Technical Journal  
[http://www.ibm.com/developerworks/websphere/techjournal/](http://www.ibm.com/developerworks/websphere/techjournal/)