Tomcat manager remote deploy script

前端 未结 6 2098
故里飘歌
故里飘歌 2020-11-28 21:45

I\'m writing a shell script to auto deploy/undeploy using the tomcat manager.

Following the instructions on http://tomcat.apache.org/tomcat-6.0-doc/manager-howto.htm

6条回答
  •  误落风尘
    2020-11-28 22:09

    This way is working for me on Tomcat 6 (See jevelopers answer for tomcat 7):

    curl --upload-file  "http://:@:/manager/deploy?path=/&update=true"
    

    Example:

    curl --upload-file target\debug.war "http://tomcat:tomcat@localhost:8088/manager/deploy?path=/debug&update=true"
    

    Very easy peasy. Output is like this:

    OK - Undeployed application at context path /debug
    OK - Deployed application at context path /debug
    

提交回复
热议问题