如何重新启动Tomcat服务器应用程序 [英] How to restart application in tomcat server

查看:415
本文介绍了如何重新启动Tomcat服务器应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在寻找一些解决方案,以重新启动远程Linux机器上的tomcat服务器内部应用程序,但我还没有发现任何东西。

I have been looking for some solution to restart app inside tomcat server on remote linux machine but i haven't found anything yet.

谁能告诉我怎样才能重新启动Tomcat服务器应用程序一段时间间隔后无需重新启动Tomcat服务器远程机器上?

Can anyone please tell me how can i restart the application in Tomcat Server after some time interval without restarting the tomcat server on remote machine?

谁能帮我出的bash脚本和cron作业?

Can anyone help me out with the Bash Script and CRON Job?

推荐答案

。首先配置你的tomcat,使访问管理器应用程序(遵循<一个href=\"http://tomcat.apache.org/tomcat-6.0-doc/manager-howto.html#Configuring_Manager_Application_Access\"相对=nofollow>这些步骤)

. First configure your tomcat to enable access to the manager application (follow these steps)

。然后测试,一切从浏览器要到网址

. Then test that everything works well from a browser going to the url

 http://your_server_url:8080/manager/reload?path=/your_app_context

 [EDITED] If your version of Tomcat is 7 or above the url must be:
 http:// your_server_url:8080/manager/text/reload?path=/your_app_context 

。使用命令行做同样的的wget 0 卷曲

 wget -O - http://your_server_url:8080/manager/reload?path=/your_app_context

。最后,编辑你的crontab(运行crontab -e命令),并设置是这样的:

. Finally edit your crontab (run crontab -e) and set something like this:

  # run each day at 01:00
  0 1 * * * wget -O - http://your_server_url:8080/manager/reload?path=/your_app_context >/dev/null 2>&1

这篇关于如何重新启动Tomcat服务器应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆