gpt4 book ai didi

linux - Tomcat 7 实例不启动 : usage catalina. sh

转载 作者:太空宇宙 更新时间:2023-11-04 10:38:44 25 4
gpt4 key购买 nike

我尝试在 CENTOS7 上安装 tomcat7 实例。

我在我的实例文件夹中写了这个脚本(例程):

export CATALINA_HOME=/usr/local/tomcat7
export CATALINA_BASE=/opt/tc7-instances/test/tomcat7
export JRE_HOME=/usr/java/jdk1.8.0_60/jre/bin/java
cd $CATALINA_HOME/bin
./startup.sh

但是当我运行它时,我收到这条消息:

Using CATALINA_BASE:   /opt/tc7-instances/test/tomcat7
Using CATALINA_HOME: /usr/local/tomcat7
Using CATALINA_TMPDIR: /opt/tc7-instances/test/tomcat7/temp
Using JRE_HOME: /usr/java/jdk1.8.0_60/jre/bin/java
Using CLASSPATH: /usr/local/tomcat7/bin/bootstrap.jar:/opt/tc7-instances/test/tomcat7/bin/tomcat-juli.jar
Usage: catalina.sh ( commands ... )
commands:
debug Start Catalina in a debugger
debug -security Debug Catalina with a security manager
jpda start Start Catalina under JPDA debugger
run Start Catalina in the current window
run -security Start in the current window with security manager
start Start Catalina in a separate window
start -security Start in a separate window with security manager
stop Stop Catalina, waiting up to 5 seconds for the process to end
stop n Stop Catalina, waiting up to n seconds for the process to end
stop -force Stop Catalina, wait up to 5 seconds and then use kill -KILL if still running
stop n -force Stop Catalina, wait up to n seconds and then use kill -KILL if still running
configtest Run a basic syntax check on server.xml - check exit code for result
version What version of tomcat are you running?
Note: Waiting for the process to end and use of the -force option require that $CATALINA_PID is defined

但是我有遵循说明:https://tomcat.apache.org/tomcat-7.0-doc/RUNNING.txt我更新了实例 xml 文件如下: http://linoxide.com/linux-how-to/install-tomcat-8-centos-7/

在我的脚本中,如果我将 ./startup.sh 更改为 ./catalina.sh start,我会遇到同样的问题..

我不明白这是什么问题

最佳答案

看起来您混淆了 $ 和 % 的环境变量扩展。试试这个:

set JAVA_OPTS="$JAVA_OPTS -Djava.endorsed.dirs=/opt/tc7-instances/test/tomcat7/endorsed"
set JAVA_OPTS="$JAVA_OPTS -Djava.io.tmpdir=/opt/tc7-instances/test/tomcat7/temp"
set JAVA_OPTS="$JAVA_OPTS -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager"
set JAVA_OPTS="$JAVA_OPTS -Djava.util.logging.config.file=/opt/tc7-instances/test/tomcat7/conf/logging.properties"
set JAVA_OPTS="$JAVA_OPTS -Dprop_locator=/opt/tc7-instances/test/conf/database.properties"
set JAVA_OPTS="$JAVA_OPTS -Dlog4j_locator=/opt/tc7-instances/test/conf/log4j.properties"
set JAVA_OPTS="$JAVA_OPTS -Dcsd.env=dev"
set JAVA_OPTS="$JAVA_OPTS -Xms128m"
set JAVA_OPTS="$JAVA_OPTS -Xmx1024m"
set JAVA_OPTS="$JAVA_OPTS -XX:PermSize=64m"
set JAVA_OPTS="$JAVA_OPTS -XX:MaxPermSize=256m"
set JAVA_OPTS="$JAVA_OPTS -Dfile.encoding=UTF-8"

关于linux - Tomcat 7 实例不启动 : usage catalina. sh,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36157690/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com