我已经安装了以下 Tomcat 发行版: http://mirror.its.dal.ca/apache/tomcat/tomcat-8/v8.5.4/bin/apache-tomcat-8.5.4.tar.gz
我已逐步遵循此说明: https://www.digitalocean.com/community/tutorials/how-to-install-apache-tomcat-8-on-ubuntu-16-04
现在,当我启动服务时,出现以下错误:
tomcat.service - Apache Tomcat Web Application Container
Loaded: loaded (/etc/systemd/system/tomcat.service; disabled; vendor preset:
Active: activating (auto-restart) (Result: exit-code) since Wed 2016-07-13 18
Process: 31037 ExecStart=/opt/tomcat/bin/startup.sh (code=exited, status=1/FAI
Jul 13 18:42:53 NewPro3D systemd[1]: Failed to start Apache Tomcat Web Applicati
Jul 13 18:42:53 NewPro3D systemd[1]: tomcat.service: Unit entered failed state.
Jul 13 18:42:53 NewPro3D systemd[1]: tomcat.service: Failed with result 'exit-co
感谢您的帮助。
答案1
我解决了这个问题:
由于某种原因,JRE_HOME 没有获得任何值 - 默认为“user/”。我尝试了 export 命令以及 bashrc,但都没有用。我手动添加了一行来在 setclasspath.sh 中设置此环境变量的值。