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. ORA-12514: TNS:listener does not currently know of service requested in connect

    https://blog.csdn.net/mchdba/article/details/50166153

  2. Cryptography I 学习笔记 --- 流密码

    1. 对于一次性密码本(one time pad),没有唯密文攻击(cypher text only attack),也就是说如果攻击者只能拿到密文,他什么也做不了 2. 完美密码:密钥长度大于密文长 ...

  3. POJ - 2391 最大流

    题目链接:http://poj.org/problem?id=2391 今天掉坑多次. 做了几道题,发现从源点出来的边和进入汇点的边都在题目中出来过. POJ真是坑,交G++一直wa,检查代码检查了好 ...

  4. Codeforces Gym - 101147G The Galactic Olympics

    Discription Altanie is a very large and strange country in Mars. People of Mars ages a lot. Some of ...

  5. jQuery使用on()绑定动态生成元素的事件无效

    jquery on()方法是jquery1.7+后才使用的 由于需求:动态添加了以下代码 <tr class="pj" data-val="no"> ...

  6. Android中的动画总结

    文章主要内容来源<Android开发艺术探索>,部分内容来源网上的文章,文中会有链接. Android系统提供了两个动画框架:属性动画框架和View动画框架. 两个动画框架都是可行的选项, ...

  7. jsp、freemarker、velocity 的区别

    在java领域,表现层技术主要有三种:jsp.freemarker.velocity. 一.jsp是大家最熟悉的技术:优点:1.功能强大,可以写java代码2.支持jsp标签(jsp tag)3.支持 ...

  8. ios- nil NULL 和 NSNull

    因为objective-c的集合对象,比如nsarray, nsdictionary, nsset等,都有可能包含nsnull对象,所以,如果以下代码中的item为nsnull,则会引起程序崩溃. N ...

  9. 【js】小数点后保留两位小数

    小数点后保留两位小数 dicountPrice.toFixed(2)

  10. 7.【nuxt起步】-Nuxt与后端数据交互

    接下来就是对接服务端接口,展示真实的数据 1.做了个虚拟接口地址:http://test.yms.cn/testjson.asp 输出数据: { "title": "单间 ...