通过脚本部署WebSphere 应用
启动脚本
set appName YBTset serverName Bancaset nodeName CHODLYBT02Node01set cellName CHODLYBT02Cell01set baseDir D:/Applications/NewYBTset fileName ybt.earputs "Please input directory name:"gets stdin dirset earFile "$baseDir/$dir/$fileName"# echo ear file puts "### INFO:Processed application EAR file is: $earFile"# check if the EAR file existsset result [file exists $earFile]if {$result == 1} {#check if the server is startset serverStatus [$AdminControl completeObjectName name=$serverName,type=Server,node=$nodeName,*]#stop the server if it has been startedif {$serverStatus != ""} {puts "### INFO:process will stop the server named $serverName first..."$AdminControl stopServer $serverName $nodeName immediateputs "### INFO:stop server $serverName complated"} #install new applicationputs "### INFO:begining update the application..."set param "-appname $appName -cell $cellName -node $nodeName -update -update.ignore.new"$AdminApp install $earFile $param puts "### INFO:application update complated"#save configurationputs "### INFO:begining save configuration ..."$AdminConfig saveputs "### INFO:Configuration saved"#Synchronize changes with Nodesputs "### INFO:begining synchronize changes with nodes..."set Sync1 [$AdminControl completeObjectName type=NodeSync,node=$nodeName,*]$AdminControl invoke $Sync1 syncputs "### INFO:Nodes synchronized "#start serverputs "### INFO:start server named $serverName..."$AdminControl startServer $serverName $nodeName puts "### INFO:Server started"puts "### Application deploy successfully ###"} else {puts "### ERROR: ### $earFile is not exist"}puts "Press any key to exit!"gets stdin exitStr