gpt4 book ai didi

java - Tomcat - 在 VPS 上运行

转载 作者:行者123 更新时间:2023-11-28 22:16:45 27 4
gpt4 key购买 nike

我试图在我的 VPS (Debian 8.8) 上运行 tomcat 8,但我遇到了以下问题:在启动 tomcat 期间:

sh startup.sh 
Using CATALINA_BASE: /usr/share/tomcat
Using CATALINA_HOME: /usr/share/tomcat
Using CATALINA_TMPDIR: /usr/share/tomcat/temp
Using JRE_HOME: /usr/local/java
Using CLASSPATH: /usr/share/tomcat/bin/bootstrap.jar:/usr/share/tomcat/bin/tomcat-juli.jar
Tomcat started.

一切正常,但 tomcat 仍然无法工作,当我想关闭服务器时,我收到以下信息:

sh shutdown.sh
Using CATALINA_BASE: /usr/share/tomcat
Using CATALINA_HOME: /usr/share/tomcat
Using CATALINA_TMPDIR: /usr/share/tomcat/temp
Using JRE_HOME: /usr/local/java
Using CLASSPATH: /usr/share/tomcat/bin/bootstrap.jar:/usr/share/tomcat/bin/tomcat-juli.jar
./catalina.sh: 1: eval: /usr/local/java/bin/java: not found

关于我的环境的一些信息:

java -version
java version "1.8.0_131"
Java(TM) SE Runtime Environment (build 1.8.0_131-b11)
Java HotSpot(TM) 64-Bit Server VM (build 25.131-b11, mixed mode)

which java
/home/ovh/src/soft/jdk1.8.0_131/bin/java

printenv
JRE_HOME=/usr/local/java
PATH=/home/ovh/src/soft/jdk1.8.0_131/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/jdk/jdk1.8.0_131/bin
JAVA_HOME=/home/ovh/src/soft/jdk1.8.0_131

最佳答案

检查您用于tomcat的用户是否具有执行权限:

  • /usr/local/java/bin/java
  • /usr/share/tomcat/bin/bootstrap.jar
  • /usr/share/tomcat/bin/tomcat-juli.jar

关于java - Tomcat - 在 VPS 上运行,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44443898/

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