+ All Categories
Home > Documents > Aprendizaje WLST

Aprendizaje WLST

Date post: 03-Mar-2016
Category:
Upload: leo-duran-t
View: 23 times
Download: 0 times
Share this document with a friend
Description:
Aprendiz

of 39

Transcript

Comandos Bsicos WLSTComandoDescripcinUso

Activate()Activa los cambios guardados en la sesin de edicin actual.Online

cancelEdit()Cancela la sesin de edicin actual.Online

cd()Navega por la jerarqua de configuracin o runtimeOnline u Offline

configToScript()Convierte una configuracin de servidor existente a un script de WLST ejecutable.Online u Offline

connect()Conecta WLST a una instancia de servidor de WebLogic.Online u Offline

disconnect()Desconecte WLST desde una instancia de WebLogic Server.Online

dumpStack()Ver seguimiento de la pila de la ltima excepcin que se produjo en el desempeo de una accin WLST y restablecer el seguimiento de la pila.Online u Offline

execfile()Ejecuta un script()Online u Offline

exit()Salir de WLSTOnline u Offline

get()Regresa el valor especfico de un atributo.Online u Offline

ls()Lista todos los Beans hijos y/o atributos para la configuracin actual o runtime Bean.Online u Offline

man()Mostrar ayuda de MBeanInfo para el MBean actual o su atributo especificado.Online

nm()Determina si WLST est conectado a Node Manager.Online

nmConnect()Conecta WLST a Node Manager para establecer una sesin.Online u Offline

nmDisconnect()Desconecta WLST de una sesin de Node Manager.Online u Offline

nmEnroll()Enrola la mquina para recibir las configuraciones en la sesin actual de WLST.Online

nmKill()Mata el servidor especificado que fue iniciado con Node Manager.Online

nmLog()Muestra los registros del Node Manager.Online u Offline

nmServerLog()Muestra la salida de registros del servidor especificado.Online u Offline

nmServerStatus()Muestra el estado del servidor especificado iniciado con Node Manager.Online u Offline

nmStart()Inicia un servidor en el dominio actual usando Node Manager.Online u Offline

nmVersion()Muestra la versin de Node ManagerOnline u Offline

pwd()Muestra la localizacin actual.Online u Offline

save()Guarda los cambios que se han realizado y que an no han sido salvados.Online

set()Establece el atributo para la configuracin actual del Bean.Online u Offline

shutdown()Apaga exitosamente un servidor o cluster en ejecucin.Online

start()Inicia un servidor manejado o un cluster usando Node Manager.Online

startEdit()Inicia una sesin de edicin.Online

startNodeManager()Inicia el Node Manager.Online u Offline

startRecording()Registre todas las interacciones del usuario con WLST, tiles para la captura de comandos.Online u Offline

startServer()Inicia el Admin ServerOnline u Offline

stopEdit()Detiene la sesin de edicin, y descarta los cambios no guardados.Online

stopNodeManager()Detiene Node Manager.Online u Offline

stopRecoding()Detiene la grabacin de comando WLST.Online u Offline

suspend()Suspende un servidor en ejecucin.Online

Enrolar Un Dominio

nmEnroll se utiliza para enrolar a un equipo o se puede decir para enrolar a un dominio con el gestor de nodos, porque si se tiene mltiples dominios (de diferentes instaladores) que se ejecutan en un equipo ste que puede manejar todo con un solo gestor de nodos, pero hay que enrolar cada dominio con el mismo gestor de nodos.Esto se aplica si se tienen dominios de diferentes oracle_home o se puede decir de diferentes dominios instalados en el mismo host (significa que tiene ms de una instalacin de WebLogic en el mismo host con cada instalador tiene su diferente host).Para enrolar un dominio con un Node Manager en particular, seguiremos los siguientes pasos:

1.- Seteamos variables de entorno de nuestro dominio Weblogic$ . /u10/middleware/user_projects/domains/x15_domain/bin/setDomainEnv.sh2.- Una vez las variables de entorno estn listas, ejecutaremos el WLST con el siguiente comando.$ java weblogic.WLST

3.- Con esto iniciaremos el WLST en modo offline. Ejecutaremos la siguiente lnea de comando para entrar al modo Online.Nota: para poder conectar con el Admin Server, debe de estar corriendo tu script starWeblogic.shconnect ('weblogic','condor321','t3://10.10.10.101:7001')

4.- Conectaremos al NodeManager con el siguiente comando.Nota: para poder conectar con el Node Manager, se debe encontrar en ejecucin.>nmConnect('weblogic','condor321','10.10.10.101','5556','x15_domain','/u10/middleware/user_projects/domains/x15_domain/','plain')

5.- Y por ltimo enrolamos el dominio con el Node Manager>nmEnroll('/u10/middleware/user_projects/domains/x15_domain','/u10/middleware/wlserver_10.3/common/nodemanager')Y con esto las configuraciones prximas estarn asociadas slo con el dominio especificado, y as evitar que todos los dominios sean modificados.

Creacin Scripts Y Configuraciones BsicasCreacin de un Script ManualAhora se ver cmo crear un script de forma manual bsico de forma manual.En este caso:Iniciar el Node Manager.Loguearse al Node Manager.Iniciar el Admin Server.Loguearse al Admin ServerPara este caso crearemos un archivo llamado startWebLogic.pyEditamosvi home/weblogic/startWebLogic.pyY aadimos las lneas necesarias para hacer lo antes mencionado.startNodeManager(verbose='false', NodeManagerHome='/adminapps/Oracle/Middleware/wlserver_10.3/common/nodemanager',ListenPort='5556',ListenAddress='ip');nmConnect('webloadm','prueba123','ip','5556','dominio_prueba','/adminapps/Oracle/Middleware/user_projects/domains/dominio_prueba/','plain')nmStart('AdminServer');connect('webloadm','prueba123','t3://localhost:7001')Ejecucin de un Script en WLSTPara la ejecucin de un script previamente creado utilizaremos el comando execfile()

En este caso utilizaremos startWeblogic.py que hemos creado anteriormente.>execfile(ruta)

Y debido a la naturaleza del script, al finalizar debemos de encontrarnos logueados en el Admin Server.WebLogic Server WLST Online and Offline Command Referenc

This command...Enables you to...Use with WLST...

activateActivate changes saved during the current editing session but not yet deployed.Online

addHelpCommandAdds new command help for a command to an existing command group. Once added to the group, the command (along with a brief description) is displayed in the command list for the group when you enter thehelp('commandGroup')command.Online or Offline

addHelpCommandGroupAdds a new help command group to those shown by the WLSThelp()command.Online or Offline

addListenerAdd a JMX listener to the specified MBean.Online

addTemplateExtend the current WebLogic domain using an application or service extension template.Offline

assignAssign resources to one or more destinations.Offline

cancelEditCancel an edit session, release the edit lock, and discard all unsaved changes. This operation can be called by any user with administrator privileges, even if the user did not start the edit session.Online

cdNavigate the hierarchy of configuration or runtime beans.Online or Offline

closeDomainClose the current WebLogic domain.Offline

closeTemplateClose the current domain template.Offline

configToScriptConvert an existing server configuration (configdirectory) to an executable WLST script.Online or Offline

connectConnect WLST to a WebLogic Server instance.Online or Offline

createCreate a configuration bean of the specified type for the current bean.Online or Offline

currentTreeReturn the current location in the hierarchy.Online

customNavigate to the root of custom MBeans that are registered in the Runtime MBean Server.Online

deleteDelete an instance of a configuration bean of the specified type for the current configuration bean.Online or Offline

deployDeploy an application to a WebLogic Server instance.Online

disconnectDisconnect WLST from a WebLogic Server instance.Online

distributeApplicationCopy the deployment bundle to the specified targets.Online

domainConfigNavigate to the last MBean to which you navigated in the domain configuration hierarchy or to the root of the hierarchy,DomainMBean.Online

domainCustomNavigate to the tree of custom MBeans that are registered in the Domain Runtime MBean Server.Online

domainRuntimeNavigate to the last MBean to which you navigated in the domain runtime hierarchy or to the root of the hierarchy,DomainRuntimeMBean.Online

dumpStackDisplay stack trace from the last exception that occurred while performing a WLST action, and reset the stack trace.Online or Offline

dumpVariablesDisplay all variables used by WLST, including their name and value.Online or Offline

editNavigate to the last MBean to which you navigated in the configuration edit MBean hierarchy or to the root of the hierarchy,DomainMBean.Online

encryptEncrypt the specified string.Online

exitExit WLST from the user session and close the scripting shell.Online or Offline

exportDiagnosticDataExecute a query against the specified log file.Offline

exportDiagnosticDataFromServerExecutes a query on the server side and retrieves the exported WebLogic Diagnostic Framework (WLDF) data.Online

findFind MBeans and attributes in the current hierarchy.Online

getReturn the value of the specified attribute.Online or Offline

getActivationTaskReturn the latestActivationTaskMBean on which a user can get status.Online

getAvailableCapturedImagesReturns a list of the previously captured diagnostic images.Online

getConfigManagerReturn the latestConfigurationManagerBeanMBean which manages the change process.Online

getMBeanReturn the MBean by browsing to the specified path.Online

getMBIReturn theMBeanInfofor the specifiedMBeanTypeor thecmovariable.Online

getPathReturn the MBean path for the specified MBean instance.Online

getWLDMReturn the WebLogicDeploymentManagerobject.Online

invokeInvoke a management operation on the current configuration bean.Online

isRestartRequiredDetermine whether a server restart is required.Online

jndiNavigates to the JNDI tree for the server to which WLST is currently connected.Online

listApplicationsList all applications that are currently deployed in the domain.Online

listChildTypesList all the children MBeans that can be created or deleted for thecmo.Online

loadApplicationLoad an application and deployment plan into memory.Online or Offline

loadDBLoad SQL files into a database.Offline

loadPropertiesLoad property values from a file.Online and Offline

lookupLook up the specified MBean.Online

lsList all child beans and/or attributes for the current configuration or runtime bean.Online or Offline

manDisplay help fromMBeanInfofor the current MBean or its specified attribute.Online

migrateMigrate services to a target server within a cluster.Online

nmDetermine whether WLST is connected to Node Manager.Online

nmConnectConnect WLST to Node Manager to establish a session.Online or Offline

nmDisconnectDisconnect WLST from a Node Manager session.Online or Offline

nmEnrollEnroll the machine on which WLST is currently running.Online

nmGenBootStartupPropsGenerates the Node Manager property files,boot.propertiesandstartup.properties, for the specified server.Online

nmKillKill the specified server instance that was started with Node Manager.Online or Offline

nmLogReturn the Node Manager log.Online or Offline

nmServerLogReturn the server output log of the server that was started with Node Manager.Online or Offline

nmServerStatusReturn the status of the server that was started with Node Manager.Online or Offline

nmStartStart a server in the current domain using Node Manager.Online or Offline

nmVersionReturn the Node Manager server version.Online or Offline

promptToggle the display of path information at the prompt.Online or Offline

pwdDisplay the current location in the configuration or runtime bean hierarchy.Online or Offline

readDomainOpen an existing WebLogic domain for updating.Offline

readTemplateOpen an existing domain template for WebLogic domain creation.Offline

redeployReload classes and redeploy a previously deployed application.Online

redirectRedirect WLST output to the specified filename.Online or Offline

removeListenerRemove a listener that was previously defined.Online

resumeResume a server instance that is suspended or inADMINstate.Online

saveSave the edits that have been made but have not yet been saved.Online

saveDiagnosticImageCaptureFileDownloads the specified diagnostic image capture.Online

saveDiagnosticImageCaptureEntryFileDownloads a specific entry from the diagnostic image capture.Online

serverRuntimeNavigate to the last MBean to which you navigated in the runtime MBean hierarchy or to the root of the hierarchy,ServerRuntimeMBean.Online

setSet the specified attribute value for the current configuration bean.Online or Offline

setOptionSet options related to a WebLogic domain creation or updateOffline

showChangesShow the changes made by the current user during the current edit session.Online

showListenersShow all listeners that are currently defined.Online

shutdownGracefully shut down a running server instance or cluster.Online

startStart a Managed Server instance or a cluster using Node Manager.Online

startApplicationStart an application, making it available to users.Online

startEditStart a configuration edit session on behalf of the currently connected user.Online

startNodeManagerStart Node Manager at default port (5556).Online or Offline

startRecordingRecord all user interactions with WLST; useful for capturing commands to replay.Online or Offline

startServerStart the Administration Server.Online or Offline

stateReturns a map of servers or clusters and their state using Node Manager.Online

stopApplicationStop an application, making it un available to users.Online

stopEditStop the current edit session, release the edit lock, and discard unsaved changes.Online

stopNodeManagerStop Node Manager.Online or Offline

stopRecordingStop recording WLST commands.Online or Offline

stopRedirectStop the redirection of WLST output to a file.Online or Offline

storeUserConfigCreate a user configuration file and an associated key file.Online

suspendSuspend a running server.Online

threadDumpDisplay a thread dump for the specified server.Online or Offline

undeployUndeploy an application from the specified servers.Online

updateApplicationUpdate an application configuration using a new deployment plan.Online

updateDomainUpdate and save the current domain.Offline

unassignUnassign applications or services from one or more destinations.Offline

undoRevert all unsaved or unactivated edits.Online

validateValidate the changes that have been made but have not yet been saved.Online

viewMBeanDisplay information about an MBean, such as the attribute names and values, and operations.Online

writeDomainWrite the domain configuration information to the specified directory.Offline

writeIniFileConvert WLST definitions and method declarations to a Python (.py) file.Online or Offline

writeTemplateWrites the domain configuration information to the specified domain template.Offline

WebLogic Server WLST Online Command SummaryThe following table summarizes the WebLogic Server WLST online commands, alphabetically by command. This table does not include custom WLST commands for FMW components. For a list of custom commands for a given FMW component, refer to the appropriate chapter in this document.Table 2-2 WebLogic Server WLST Online Command SummaryThis command...Enables you to...

activateActivate changes saved during the current editing session but not yet deployed.

addHelpCommandAdds new command help for a command to an existing command group. Once added to the group, the command (along with a brief description) is displayed in the command list for the group when you enter thehelp('commandGroup')command.

addHelpCommandGroupAdds a new help command group to those shown by the WLSThelp()command, and specifies the resource bundle in which the help information is defined for the group.

addListenerAdd a JMX listener to the specified MBean.

cancelEditCancel an edit session, release the edit lock, and discard all unsaved changes. This operation can be called by any user with administrator privileges, even if the user did not start the edit session.

cdNavigate the hierarchy of configuration or runtime beans.

configToScriptConvert an existing server configuration (configdirectory) to an executable WLST script.

connectConnect WLST to a WebLogic Server instance.

createCreate a configuration bean of the specified type for the current bean.

currentTreeReturn the current tree location.

customNavigate to the root of custom MBeans that are registered in the Runtime MBean Server.

deleteDelete an instance of a configuration bean of the specified type for the current configuration bean.

deployDeploy an application to a WebLogic Server instance.

disconnectDisconnect WLST from a WebLogic Server instance.

distributeApplicationCopy the deployment bundle to the specified targets.

domainConfigNavigate to the last MBean to which you navigated in the domain configuration hierarchy or to the root of the hierarchy,DomainMBean.

domainCustomNavigate to the tree of custom MBeans that are registered in the Domain Runtime MBean Server.

domainRuntimeNavigate to the last MBean to which you navigated in the domain runtime hierarchy or to the root of the hierarchy,DomainRuntimeMBean.

dumpStackDisplay stack trace from the last exception that occurred, and reset the trace.

dumpVariablesDisplay all variables used by WLST, including their name and value.

editNavigate to the last MBean to which you navigated in the configuration edit MBean hierarchy or to the root of the hierarchy,DomainMBean.

encryptEncrypt the specified string.

exitExit WLST from the interactive session and close the scripting shell.

exportDiagnosticDataFromServerExecute a query on the server side and retrieves the exported WebLogic Diagnostic Framework (WLDF) data.

findFind MBeans and attributes in the current hierarchy.

getReturn the value of the specified attribute.

getActivationTaskReturn the latestActivationTaskMBean on which a user can get status.

getAvailableCapturedImagesReturns a list of the previously captured diagnostic images.

getConfigManagerReturn the latestConfigurationManagerBeanMBean which manages the change process.

getMBeanReturn the MBean by browsing to the specified path.

getMBIReturn theMBeanInfofor the specifiedMBeanTypeor thecmovariable.

getPathReturn the MBean path for the specified MBean instance.

getWLDMReturn the WebLogicDeploymentManagerobject.

invokeInvoke a management operation on the current configuration bean.

isRestartRequiredDetermine whether a server restart is required.

jndiNavigates to the JNDI tree for the server to which WLST is currently connected.

listApplicationsList all applications that are currently deployed in the domain.

listChildTypesList all the children MBeans that can be created or deleted for thecmo.

loadApplicationLoad an application and deployment plan into memory.

loadPropertiesLoad property values from a file.

lookupLook up the specified MBean.

lsList all child beans and/or attributes for the current configuration or runtime bean.

manDisplay help fromMBeanInfofor the current MBean or its specified attribute.

migrateMigrate services to a target server within a cluster.

nmDetermine whether WLST is connected to Node Manager.

nmConnectConnect WLST to Node Manager to establish a session.

nmDisconnectDisconnect WLST from a Node Manager session.

nmEnrollEnroll the machine on which WLST is currently running.

nmGenBootStartupPropsGenerates the Node Manager property files,boot.propertiesandstartup.properties, for the specified server.

nmKillKill the specified server instance that was started with Node Manager.

nmLogReturn the Node Manager log.

nmServerLogReturn the server output log of the server that was started with Node Manager.

nmServerStatusReturn the status of the server that was started with Node Manager.

nmStartStart a server in the current domain using Node Manager.

nmVersionReturn the Node Manager server version.

promptToggle the display of path information at the prompt.

pwdDisplay the current location in the configuration or runtime bean hierarchy.

redeployReload classes and redeploy a previously deployed application.

redirectRedirect WLST output to the specified filename.

removeListenerRemove a listener that was previously defined.

resumeResume a server instance that is suspended or inADMINstate.

saveSave the edits that have been made but have not yet been saved.

saveDiagnosticImageCaptureFileDownloads the specified diagnostic image capture.

saveDiagnosticImageCaptureEntryFileDownloads a specific entry from the diagnostic image capture.

serverConfigNavigate to the last MBean to which you navigated in the configuration MBean hierarchy or to the root of the hierarchy,DomainMBean.

serverRuntimeNavigate to the last MBean to which you navigated in the runtime MBean hierarchy or to the root of the hierarchy,ServerRuntimeMBean.

setSet the specified attribute value for the current configuration bean.

showChangesShow the changes made by the current user during the current edit session.

showListenersShow all listeners that are currently defined.

shutdownGracefully shut down a running server instance or cluster.

startStart a Managed Server instance or a cluster using Node Manager.

startApplicationStart an application, making it available to users.

startEditStart a configuration edit session on behalf of the currently connected user.

startNodeManagerStart Node Manager at default port (5556).

startRecordingRecord all user interactions with WLST; useful for capturing commands to replay.

startServerStart the Administration Server.

stateReturns a map of servers or clusters and their state using Node Manager

stopApplicationStop an application, making it un available to users.

stopEditStop the current edit session, release the edit lock, and discard unsaved changes.

stopNodeManagerStop Node Manager.

stopRedirectStop the redirection of WLST output to a file.

storeUserConfigCreate a user configuration file and an associated key file.

suspendSuspend a running server.

threadDumpDisplay a thread dump for the specified server.

undeployUndeploy an application from the specified servers.

undoRevert all unsaved or unactivated edits.

updateApplicationUpdate an application configuration using a new deployment plan.

validateValidate the changes that have been made but have not yet been saved.

viewMBeanDisplay information about an MBean, such as the attribute names and values, and operations.

writeIniFileConvert WLST definitions and method declarations to a Python (.py) file.

WebLogic Server WLST Offline Command SummaryThe following table summarizes the WebLogic Server WLST offline commands, alphabetically by command.Table 2-3 WebLogic Server WLST Offline Command SummaryThis command...Enables you to...

addHelpCommandAdds new command help for a command to an existing command group. Once added to the group, the command (along with a brief description) is displayed in the command list for the group when you enter thehelp('commandGroup')command.

addHelpCommandGroupAdds a new help command group to those shown by the WLSThelp()command, and specifies the resource bundle in which the help information is defined for the group.

addTemplateExtend the current domain using an application or service extension template.

assignAssign resources to one or more destinations.

cdNavigate the hierarchy of configuration or runtime beans.

closeDomainClose the current domain.

closeTemplateClose the current domain template.

configToScriptConvert an existing server configuration (configdirectory) to an executable WLST script.

connectConnect WLST to a WebLogic Server instance.

createCreate a configuration bean of the specified type for the current bean.

deleteDelete an instance of a configuration bean of the specified type for the current configuration bean.

dumpStackDisplay stack trace from the last exception that occurred while performing a WLST action, and reset the stack trace.

dumpVariablesDisplay all variables used by WLST, including their name and value.

exitExit WLST from the interactive session and close the scripting shell.

exportDiagnosticDataExecute a query against the specified log file.

getReturn the value of the specified attribute.

loadDBLoad SQL files into a database.

loadPropertiesLoad property values from a file.

lsList all child beans and/or attributes for the current configuration or runtime bean.

nmConnectConnect WLST to Node Manager to establish a session.

promptToggle the display of path information at the prompt.

pwdDisplay the current location in the configuration or runtime bean hierarchy.

readDomainOpen an existing WebLogic domain for updating.

readTemplateOpen an existing domain template for domain creation.

redirectRedirect WLST output to the specified filename.

setSet the specified attribute value for the current configuration bean.

setOptionSet options related to a WebLogic domain creation or update.

startNodeManagerStart Node Manager at default port (5556).

startRecordingRecord all user interactions with WLST; useful for capturing commands to replay.

startServerStart the Administration Server.

stopNodeManagerStop Node Manager.

stopRedirectStop the redirection of WLST output to a file.

threadDumpDisplay a thread dump for the specified server.

unassignUnassign applications or services from one or more destinations.

updateDomainUpdate and save the current domain.

writeDomainWrite the domain configuration information to the specified directory.

writeIniFileConvert WLST definitions and method declarations to a Python (.py) file.

writeTemplateWrites the domain configuration information to the specified domain template.


Recommended