gpt4 book ai didi

tomcat - 在 Fedora 16 (Verne) 中启动 Apache Tomcat

转载 作者:行者123 更新时间:2023-11-28 23:40:06 25 4
gpt4 key购买 nike

我正在尝试在 Fedora 16 中启动 Tomcat。出于某种原因,catalina.sh 脚本没有接受任何参数,因此脚本总是以打印 usage 子句结束:

[demo@localhost bin]$ ./catalina.sh run
Using CATALINA_BASE: /home/demo/tomcat-asm
Using CATALINA_HOME: /home/demo/tomcat-asm
Using CATALINA_TMPDIR: /home/demo/tomcat-asm/temp
Using JRE_HOME: /opt/java/jdk1.7.0_45/bin/java
Using CLASSPATH: /home/demo/tomcat-asm/bin/bootstrap.jar:/home/demo/tomcat-asm/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

我尝试使用 catalina.sh 和 startup.sh,但两者的效果相同。我检查了所有 .sh 文件都具有 x 权限:

[demo@localhost bin]$ ls -lah
total 740K
drwxrwxr-x. 2 demo demo 4.0K Dec 11 07:23 .
drwxrwxr-x. 11 demo demo 4.0K Dec 11 07:08 ..
-rw-rw-r--. 1 demo demo 28K Jul 2 02:59 bootstrap.jar
-rw-rw-r--. 1 demo demo 14K Sep 11 07:25 catalina.bat
-rw-rw-r--. 1 demo demo 14K Sep 5 13:35 catalina.bat~
-rwxrwxr-x. 1 demo demo 20K Dec 11 07:11 catalina.sh
-rw-rw-r--. 1 demo demo 20K Dec 11 07:11 catalina.sh~
-rw-rw-r--. 1 demo demo 2.2K Jul 2 02:59 catalina-tasks.xml
-rw-rw-r--. 1 demo demo 24K Jul 2 02:59 commons-daemon.jar
-rw-rw-r--. 1 demo demo 201K Jul 2 02:59 commons-daemon-native.tar.gz
-rw-rw-r--. 1 demo demo 2.1K Jul 2 02:59 configtest.bat
-rwxrwxr-x. 1 demo demo 2.0K Jul 2 02:59 configtest.sh
-rw-rw-r--. 1 demo demo 1.4K Jul 2 02:59 cpappend.bat
-rwxrwxr-x. 1 demo demo 7.4K Jul 2 02:59 daemon.sh
-rw-rw-r--. 1 demo demo 2.2K Jul 2 02:59 digest.bat
-rwxrwxr-x. 1 demo demo 2.0K Jul 2 02:59 digest.sh
-rw-rw-r--. 1 demo demo 3.2K Jul 2 02:59 setclasspath.bat
-rwxrwxr-x. 1 demo demo 3.5K Jul 2 02:59 setclasspath.sh
-rw-rw-r--. 1 demo demo 2.1K Jul 2 02:59 shutdown.bat
-rwxrwxr-x. 1 demo demo 2.0K Jul 2 02:59 shutdown.sh
-rw-rw-r--. 1 demo demo 2.1K Jul 2 02:59 startup.bat
-rwxrwxr-x. 1 demo demo 2.0K Jul 2 02:59 startup.sh
-rw-rw-r--. 1 demo demo 38K Jul 2 02:59 tomcat-juli.jar
-rw-rw-r--. 1 demo demo 282K Jul 2 02:59 tomcat-native.tar.gz
-rw-rw-r--. 1 demo demo 4.1K Jul 2 02:59 tool-wrapper.bat
-rwxrwxr-x. 1 demo demo 5.0K Jul 2 02:59 tool-wrapper.sh
-rw-rw-r--. 1 demo demo 2.1K Jul 2 02:59 version.bat
-rwxrwxr-x. 1 demo demo 2.0K Jul 2 02:59 version.sh
[demo@localhost bin]$

那么这里可能是什么问题呢?有没有可能是出于某种奇怪的原因,脚本没有接受我的论点?

最佳答案

尽管这可能很愚蠢,但原因是我在脚本中使用了类似 Windows 的变量定义:

set JAVA_OPTS=...

代替

export JAVA_OPTS=...

不幸的是,没有迹象表明脚本失败的原因。因此,如果您遇到这种情况,请仔细检查您的启动脚本是否存在语法错误。

关于tomcat - 在 Fedora 16 (Verne) 中启动 Apache Tomcat,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20519207/

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