Weblogic WLST使用(命令行、调用jython脚本)

本文档介绍了如何使用Weblogic WLST进行命令行操作和调用Jython脚本,包括通过wlst.sh执行管理任务如连接、重启、部署,以及如何将命令封装到Jython脚本中,提供了具体的使用示例。
摘要由CSDN通过智能技术生成

Weblogic WLST使用(命令行、调用jython脚本)

参考文档Fusion Middleware WebLogic Scripting Tool Command Reference

1. 调用脚本wlst.sh 执行相关操作
#<MIDDLEWARE_HOME>需替换成实际路径
cd <MIDDLEWARE_HOME>/oracle_common/common/bin
sh wlst.sh
  • connect 连接管理控制台

    wls:/offline> connect('weblogic','welcome1','t3://localhost:8001') 
    Connecting to weblogic server instance running at t3://localhost:8001 as 
    username weblogic...
    
    Successfully connected to Admin Server 'AdminServer' that belongs to domain
    'mydomain'.
    
    Warning: An insecure protocol was used to connect to the server. To ensure 
    on-the-wire security, the SSL port or Admin port should be used instead. 
    
    wls:/mydomain/serverConfig>
    
  • shutdown、start 重启服务器、集群、主节点

    wls:/mydomain/serverConfig> start('myserver', 'Server', 't3://10.7.54.88:7001) 
    Starting server myserver ...
    Server with name myserver started successfully.
    wls:/mydomain/serverConfig>
    
    wls:/mydomain/serverConfig> shutdown('myserver','Server','true',0, 'ture','true') 
    
  • deploy 部署项目 redeploy、undeploy

    wls:/mydomain/serverConfig/Servers> progress= deploy(appName='businessApp',
    path='c:/myapps/business',createplan='true') 
    

    查看部署结果

    wls:/mydomain/serverConfig/Servers> progress.printStatus() 
    Current Status of your Deployment:
    Deployment command type: deploy
    Deployment State       : completed
    Deployment Message     : null
    wls:/mydomain/serverConfig/Servers>
    
  • disconnect* 断开连接

    wls:/mydomain/serverConfig> disconnect() 
    Disconnected from weblogic server: myserver
    wls:/offline> 
    

    命令参考:

    This command… Enables you to… Use with WLST…
    deploy Deploy an application to a WebLogic Server instance. Online
    distributeApplication Copy the deployment bundle to the specified targets. Online
    getWLDM Return the WebLogic DeploymentManager object. Online
    listApplications List all applications that are currently deployed in the WebLogic domain. Online
    loadApplication Load an application and deployment plan into memory. Online and Offline
    redeploy Redeploy a previously deployed application. Online
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值