Deploy EAR file to WAS 7 from command line

2019-04-06 12:45发布

I need to deploy an EAR file that is located in sever A to a WebSphere Server located in server B. I need to know how to deploy the EAR from server A to my WAS through command line. I have seared the web but found results only fro WAS 6 (i have WAS 7). does any one know how to deploy an EAR to WAS (in a different server) through command line?

2条回答
贪生不怕死
2楼-- · 2019-04-06 13:10

I assume both servers are standalone. If so, use WAS_HOME/bin/wsadmin on server A, and specify the RMI host/port for serverB. If not, specify the host/port of the deployment manager for serverB.

wsadmin -host serverB.host.com -port serverBRMIPortNumber -c '$AdminApp install /path/to/localfile.ear {...options...}'

Note, this is UNIX syntax; for Windows syntax, use "double quotes". Alternatively, you can omit the -c and use interactive mode, or you can use -f file.jacl. Jython scripting is available with -lang jython. See the following for AdminApp install options (e.g., -appname or -usedefaultbindings):

http://publib.boulder.ibm.com/infocenter/wasinfo/fep/topic/com.ibm.websphere.nd.multiplatform.doc/info/ae/ae/rxml_taskoptions.html

查看更多
forever°为你锁心
3楼-- · 2019-04-06 13:28

You should really consider a nodeagent, that would make all of this go away. I'm assuming you're not in a clustered environment, otherwise a simple push to and synch of a nodeagent would do the trick.

The answer above is correct, but you could also simply FTP the package to be deployed to serverB and just use wsadmin to install locally, as well.

查看更多
登录 后发表回答