尝试在ubuntu 12.04上安装Tomcat 8,但我对Catalina组件有以下问题,我认为它与日志文件有关。
这是命令结果:
~# $CATALINA_HOME/bin/startup.sh
Using CATALINA_BASE: /opt/apache-tomcat-8.0.15-src
Using CATALINA_HOME: /opt/apache-tomcat-8.0.15-src
Using CATALINA_TMPDIR: /opt/apache-tomcat-8.0.15-src/temp
Using JRE_HOME: /usr/lib/jvm/default-java
Using CLASSPATH: /opt/apache-tomcat-8.0.15-src/bin/bootstrap.jar:/opt/apache-tomcat-8.0.15-src/bin/tomcat-juli.jar
touch: cannot touch `/opt/apache-tomcat-8.0.15-src/logs/catalina.out': No such file or directory
/opt/apache-tomcat-8.0.15-src/bin/catalina.sh: 399: /opt/apache-tomcat-8.0.15-src/bin/catalina.sh: cannot create /opt/apache-tomcat-8.0.15-src/logs/catalina.out: Directory nonexistent
更新: 我试着以sudo的形式执行最后一个命令。这是输出:
~# sudo $CATALINA_HOME/bin/startup.sh
sudo: /etc/sudoers.d/README is mode 0777, should be 0440
Using CATALINA_BASE: /opt/apache-tomcat-8.0.15-src
Using CATALINA_HOME: /opt/apache-tomcat-8.0.15-src
Using CATALINA_TMPDIR: /opt/apache-tomcat-8.0.15-src/temp
Using JRE_HOME: /usr
Using CLASSPATH: /opt/apache-tomcat-8.0.15-src/bin/bootstrap.jar:/opt/apache-tomcat-8.0.15-src/bin/tomcat-juli.jar
/opt/apache-tomcat-8.0.15-src/bin/catalina.sh: 399: /opt/apache-tomcat-8.0.15-src/bin/catalina.sh: cannot create /opt/apache-tomcat-8.0.15-src/logs/catalina.out: Directory nonexistent
答案 0 :(得分:1)
尝试将其作为sudo运行
sudo sh $CATALINA_HOME/bin/startup.sh
<强>更新强>
如果你已经通过apt-get安装了tomcat,那么你必须通过服务启动它,试试这个 -
sudo service tomcat start
sudo service tomcat stop