Tomcat manager remote deploy script

前端 未结 6 2088
故里飘歌
故里飘歌 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:23

    Providing an update to this question.

    Tomcat 7 has changed it's manager API.

    Please refer to: Manager commands

    Following new URL pattern :

    http://{host}:{port}/manager/text/{command}?{parameters}
    

    Example

    curl -T "myapp.war" "http://manager:manager@localhost:8080/manager/text/deploy?path=/myapp&update=true"
    

    Security

    Keep in mind the server must be able to accept your remote IP. This is a sample configuration:

    
      
    
    

    This is an optional setting and isn't required but having Cross domain role and proper manager credentials is a must.

    Tomcat 8 - the same rules apply as Tomcat 7. Same commands.

    Here is a full documentation:

    http://tomcat.apache.org/tomcat-8.0-doc/manager-howto.html

提交回复
热议问题