stack overflow 给出的答案:

catalina.sh run starts tomcat in the foreground, displaying the logs on the console that you started it. Hitting Ctrl-C will terminate tomcat.

startup.sh will start tomcat in the background. You'll have to tail -f logs/catalina.out to see the logs.

Both will do the same things, apart from the foreground/background distinction.

Actually, startup.sh is quite small. If you inspect the file, you'll see that it in turn calls catalina.sh start. And in catalina.sh you can just search for occurrences of run and start in order to see the difference in how they're handled.

service tomcat start is typically starting a daemon in the background on Linux (or *nix), through yet another (non-tomcat) OS-script e.g. in /etc/init.d. It typically also takes care of running tomcat as a specific user (often called "tomcat" or similar). If you're using your Linux-distribution's tomcat, you should only start with this script. Otherwise you're risking that temporary files or log files can't be overwritten, because they belong to a different user that you used to start tomcat with earlier.

答案网址:stack overflow

本文由个人 hexo 博客 co2fe.com 迁移
date: 2017-09-25 16:06:10

Whats the difference between service tomcat ./startup.sh and ./catalina.sh run的更多相关文章

  1. liunx下tomcat启动 Cannot find ./catalina.sh

    执行启动tomcat命令./startup.sh 提示 Cannot find ./catalina.sh The file is absent or does not have execute pe ...

  2. macOS中启动Tomcat提示Cannot find ./catalina.sh

    首先查看Tomcat目录下是否存在catalina.sh,如果文件不存在,文件丢失,最好的方式是重装Tomcat Tomcat官网:http://tomcat.apache.org/ 如果文件存在,那 ...

  3. 启动tomcat的Cannot find ./catalina.sh 的问题

    从终端进入tomcat的bin目录,然后执行startup.sh Cannot find bin/catalina.sh The file is absent or does not have exe ...

  4. Linux 下Tomcat启动Cannot find ./catalina.sh

    [root@localhost bin]# ./shutdown.sh shCannot find ./catalina.shThis file is needed to run this progr ...

  5. linux下Tomcat 安装后执行startup.sh,出现– Cannot find …bin/catalina.sh

    linux下Tomcat 安装后执行startup.sh,出现– Cannot find …bin/catalina.sh 是因为权限不够,执行以下命令就可以: chmod +x startup.sh ...

  6. Tomcat启动脚本catalina.sh

    1 - 概述脚本catalina.sh用于启动和关闭tomcat服务器,是最关键的脚本另外的脚本startup.sh和shutdown.sh都是使用不同的参数调用了该脚本该脚本的使用方法如下(引自该脚 ...

  7. Tomcat远程调试catalina.sh的配置

    #!/bin/sh # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license ...

  8. tomcat catalina.sh JAVA_OPTS参数说明与配置

    JVM的博客: http://blog.csdn.net/java2000_wl/article/category/1249100 http://blog.csdn.net/cutesource/ar ...

  9. 对于tomcat通过catalina.sh停止服务后,tomcat进程没有退出问题解决办法

    例:tomcat路径及名称为/data/apache-tomcat-7.0.67/ vim /data/apache-tomcat-7.0.67/bin/catalina.sh 找到org.apach ...

随机推荐

  1. AC日记——爱改名的小融3 codevs 3156

    3156 爱改名的小融 3  时间限制: 1 s  空间限制: 128000 KB  题目等级 : 黄金 Gold 题解       题目描述 Description Wikioi上有个人叫小融,他喜 ...

  2. 在 .Net Core xUnit test 项目中使用配置文件

    在对项目做集成测试的时候,经常会需要用到一些参数比如用户名密码等,这些参数不宜放在测试代码中.本文介绍一种方法:使用配置文件. 添加配置文件 在集成测试项目目录下新建文件:Configuration. ...

  3. Codeforces 946 A.Partition

    随便写写,然后写D的题解. A. Partition   time limit per test 1 second memory limit per test 256 megabytes input ...

  4. Symmetric Tree(DFS,二叉树的构建以及测试代码)

    基础有待加强啊,由该题引发出来一些问题,现在来总结下. 首先是二叉树的结构: struct TreeNode { EleType val; TreeNode *left; TreeNode *righ ...

  5. Ext.Ajax.request批量提交表单

    介绍一下批量提交grid中数据的问题 js文件中的提交方法如下: listeners: { click: function btnClick(button) { var win = button.up ...

  6. javascript --- 兼容的那些事

    绑定事件 var addEvent = function( obj, type, fn ) { if (obj.addEventListener) obj.addEventListener( type ...

  7. GOF 23种设计摩搜-建造者模式

    • 场景: – 我们要建造一个复杂的产品.比如:神州飞船,Iphone.这个复杂的产品的创建.有这样 一个问题需要处理: • 装配这些子组件是不是有个步骤问题? – 实际开发中,我们所需要的对象构建时 ...

  8. SilverLight:基础控件使用(2)-ComboBox,ListBox控件

    ylbtech-SilverLight-Basic-Control:基础控件使用(2)-ComboBox,ListBox控件 直接在 XAML 代码中设置 Items 和通过后台代码绑定数据源 Com ...

  9. 2.SOAP 语法

    SOAP 消息的基本结构 <?xml version="1.0"?> <soap:Envelope xmlns="http://www.w3.org/2 ...

  10. GDB调试多线程程序

    gdb有thread相关命令,如info thread(简写成info th)显示线程消息,b xx thread yy可以针对某个thread设置断点,thread xx(简写成thr xx)切换到 ...