Skip to content

Instantly share code, notes, and snippets.

@GeekaholicLin
Created September 13, 2016 02:38
Show Gist options
  • Save GeekaholicLin/ac5c2681b921717bd3ef1a8cf2cd6e08 to your computer and use it in GitHub Desktop.
Save GeekaholicLin/ac5c2681b921717bd3ef1a8cf2cd6e08 to your computer and use it in GitHub Desktop.
Tomcat startup script not running

最近在折腾ubuntu服务器的时候,使用sudo apt-get install tomcat7安装了tomcat7后,在/usr/share/tomcat7/bin/目录下无法启动tomcat7, 显示如下错误:

Using CATALINA_BASE: /usr/share/tomcat7 Using CATALINA_HOME: /usr/share/tomcat7 Using CATALINA_TMPDIR: /usr/share/tomcat7/temp Using JRE_HOME: /usr/lib/jvm/default-java Using CLASSPATH: /usr/share/tomcat7/bin/bootstrap.jar:/usr/share/tomcat7/bin/tomcat-juli.jar touch: cannot touch `/usr/share/tomcat7/logs/catalina.out': No such file or directory /usr/share/tomcat7/bin/catalina.sh: 389: /usr/share/tomcat7/bin/catalina.sh: cannot create /usr/share/tomcat7/logs/catalina.out:

最终Google到了解决办法

When installed using the tomcat7 package, it is intended that you start and stop Tomcat using upstart (service tomcat start) **or the /etc/init.d/tomcat script. If you start it using the startup.sh script ** then it is likely to have its environmental variables incorrectly configured.

所以解决办法是:

并不需要去/usr/share/tomcat7/bin/目录启动那么麻烦。可以到 /etc/init.d/sudo权限启动tomcat7脚本。 或者直接sudo service tomcat7 start启动。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment