Whats the difference between service tomcat ./startup.sh and ./catalina.sh run
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的更多相关文章
- liunx下tomcat启动 Cannot find ./catalina.sh
执行启动tomcat命令./startup.sh 提示 Cannot find ./catalina.sh The file is absent or does not have execute pe ...
- macOS中启动Tomcat提示Cannot find ./catalina.sh
首先查看Tomcat目录下是否存在catalina.sh,如果文件不存在,文件丢失,最好的方式是重装Tomcat Tomcat官网:http://tomcat.apache.org/ 如果文件存在,那 ...
- 启动tomcat的Cannot find ./catalina.sh 的问题
从终端进入tomcat的bin目录,然后执行startup.sh Cannot find bin/catalina.sh The file is absent or does not have exe ...
- Linux 下Tomcat启动Cannot find ./catalina.sh
[root@localhost bin]# ./shutdown.sh shCannot find ./catalina.shThis file is needed to run this progr ...
- linux下Tomcat 安装后执行startup.sh,出现– Cannot find …bin/catalina.sh
linux下Tomcat 安装后执行startup.sh,出现– Cannot find …bin/catalina.sh 是因为权限不够,执行以下命令就可以: chmod +x startup.sh ...
- Tomcat启动脚本catalina.sh
1 - 概述脚本catalina.sh用于启动和关闭tomcat服务器,是最关键的脚本另外的脚本startup.sh和shutdown.sh都是使用不同的参数调用了该脚本该脚本的使用方法如下(引自该脚 ...
- Tomcat远程调试catalina.sh的配置
#!/bin/sh # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license ...
- tomcat catalina.sh JAVA_OPTS参数说明与配置
JVM的博客: http://blog.csdn.net/java2000_wl/article/category/1249100 http://blog.csdn.net/cutesource/ar ...
- 对于tomcat通过catalina.sh停止服务后,tomcat进程没有退出问题解决办法
例:tomcat路径及名称为/data/apache-tomcat-7.0.67/ vim /data/apache-tomcat-7.0.67/bin/catalina.sh 找到org.apach ...
随机推荐
- HDU 5212 Code【莫比乌斯反演】
题目链接: http://acm.hdu.edu.cn/showproblem.php?pid=5212 题意: 给定序列,1≤i,j≤n,求gcd(a[i],a[j])∗(gcd(a[i],a[j] ...
- C++对象
- unigui控件的FASTSCRIPT封装
unigui控件的FASTSCRIPT封装 unit fs_uniControl; interface{$i fs.inc}uses fs_iinterpreter, fs_itools, fs_ie ...
- 讯飞语音识别Android-Demo
import java.io.UnsupportedEncodingException; import android.app.Activity; import android.os.Bundle; ...
- 如何让你的服务屏蔽Shodan扫描
1. 前言 在互联网中,充斥着各种各样的网络设备,shodan等搜索引擎提供给了我们一个接口,让我们可以在输入一些过滤条件就可以检索出网络中相关的设备. 对于我们的一些可能有脆弱性或者比较隐私的服务, ...
- elasticsearch 最佳实践
创建索引 无mapping 创建索引名称为index的索引 curl -XPUT http://localhost:9200/book 有mapping 如果需要定义每个类型的结构映射,创建type名 ...
- LinearLayout具体解释三:LayoutInflater创建View过程分析
上次讲到以下这么一段代码,这段代码的作用就是解析xml文件成为view并显示到屏幕上的. @Override //设置contentview,也就是activity或fragment载入视图,即vie ...
- vue2.0 + vux (一)Header 组件
1.main.js import Vue from 'vue' import FastClick from 'fastclick' import VueRouter from 'vue-router' ...
- linux中断子系统:中断号的映射与维护初始化mmap过程
本文均属自己阅读源代码的点滴总结.转账请注明出处谢谢. 欢迎和大家交流.qq:1037701636 email:gzzaigcn2009@163.com 写在前沿: 好久好久没有静下心来整理一些东西了 ...
- lockfile - conditional semaphore-file creator
LOCKFILE(1) LOCKFILE(1) NAME lockfile - conditional semaphore-file creator SYNOPSIS lockfile -sleept ...