如何在Linux的控制台上使用输出启动Tomcat? [英] How to start Tomcat with output on console in Linux?

查看:154
本文介绍了如何在Linux的控制台上使用输出启动Tomcat?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道可以启动tomcat,然后运行tail -f catalina.out以查看Tomcat输出.但是如何运行tomcat并立即查看输出呢?可以使用startup.sh运行某些选项吗?

I know it's possible to start tomcat and then run tail -f catalina.out to view Tomcat output. But how to run tomcat and view output at once? Are there some options to run startup.sh with?

推荐答案

您正在寻找

tomcat/bin/catalina.sh run

代替

tomcat/bin/startup.sh; tail -f tomcat/logs/catalina.out

Tomcat以这种方式保持在前台(第一个选项).如果要关闭它,请在控制台窗口中按Ctrl-C即可完成操作.

Tomcat stays in foreground this way (first option). If you want to shut it down, Ctrl-C in your console window will do the trick.

如果选择第二个选项,tomcat将在后台运行,而tail将在前台运行,但是您必须两次指定相同的目录路径.

If you choose the second option, tomcat will run in background, while tail will run in foreground, but you'll have to give the same directory path twice.

这篇关于如何在Linux的控制台上使用输出启动Tomcat?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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