gpt4 book ai didi

tomcat - 使用curl将war文件部署到远程tomcat 8

转载 作者:行者123 更新时间:2023-11-28 23:19:23 26 4
gpt4 key购买 nike

我想从远程机器A部署一个war到运行tomcat的机器B

我在 tomcat-users.xml 中设置了以下内容在机器B上

<role rolename="manager-gui"/>
<role rolename="manager-script"/>
<user username="tomcat" password="tomcat" roles="manager-gui,manager-script"/>

我在机器 A 上运行了以下命令

$ curl -T "test.war" "http://tomcat:tomcat@<machine b>:8080/manager/text/deploy?path=/temp&update=true" -v
* Trying machine B IP...
* Connected to (machine B IP) port 8080 (#0)
* Server auth using Basic with user 'tomcat'
> PUT /manager/text/deploy?update=true HTTP/1.1
> Host: <machine b>:8080
> Authorization: Basic dG9tY2F0OnRvbWNhdA==
> User-Agent: curl/7.47.0
> Accept: */*
> Content-Length: 374778991
> Expect: 100-continue
>
< HTTP/1.1 404 Not Found
< Server: Apache-Coyote/1.1
< Content-Length: 0
< Date: Sun, 13 Aug 2017 00:12:37 GMT
* HTTP error before end of send, stop sending
<
* Closing connection 0

我试着打开经理页面 http:<machine b>8080/manager/html , 但打不开。我不确定我是否缺少任何配置或上下文路径不正确。

最佳答案

我是在ubuntu上下载tomcat6-admin,然后把manager目录复制到原tomcat 8的webapps文件夹下解决的。

关于tomcat - 使用curl将war文件部署到远程tomcat 8,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45656020/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com