繁体   English   中英

远程启动和停止Websphere Server

[英]Start and Stop websphere server remote

我需要脚本来启动和停止Web Sphere服务器。

我的需求是需要编写build.xml,我需要在Hudson中对其进行配置以启动和停止Web sphere应用程序服务器。

我完成了所有任务,但是停止和启动并不熟悉的ant脚本。 请提供任何示例。

这取决于您使用的是WebSphere Classic还是WebSphere Liberty。 两种产品都有启动/停止服务器脚本,但是它们略有不同。

WebSphere经典:
开始:$ WAS_INSTALL_HOME / bin / startServer <服务器名称>
停止:$ WAS_INSTALL_HOME / bin / stopServer <服务器名称>

WebSphere Liberty:
开始:$ WLP_INSTALL_HOME / bin / server开始<服务器名称>
停止:$ WLP_INSTALL_HOME / bin / server停止<服务器名称>

一旦知道如何手动执行这些命令,就可以使用ant <sshexec>任务在远程服务器上运行这些命令。

<sshexec host="somehost" username="user1" password="pwd1" command="/path/to/WAS/bin/server start myserver"/>

使用以下ant脚本来启动和停止WebSphere Server:

<!--Stop Server--><sshexec host="websphere.host.IP" username="websphere.host.username" password="websphere.host.password"
        command="$sudo server_location/bin/stopServer.sh server_name" trust="true" />

<!--Start Server--><sshexec host="websphere.host.IP" username="websphere.host.username" password="websphere.host.password"
        command="$sudo server_location/bin/startServer.sh server_name" trust="true" />

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM