如果我apt-get install tomcat7正在安装损坏的 tomcat7。一个简单的 startup.sh 会给我错误,而不是固定时说 tomcat 已经启动但没有显示在 localhost:8080 中。shutdown.sh 会给我错误,甚至抛出 Java 异常。这在以前的一些 Ubuntu 版本中没有发生,在那里它只是工作。所以,看起来最近没有维护的tomcat包。
当我测试我的 Web 应用程序时,我可以从 Eclipse(顺便说一下它也没有得到正确维护)让它工作。但是,有些事情我需要在独立的 tomcat 安装中进行测试。到目前为止,谷歌还没有帮助。
你们中有没有人设法在 Ubuntu 14.4LTS 中正确安装 tomcat7?如果是这样,你能指出我正确的方向吗?
编辑:
这是一些日志。
启动tomcat:
$ sudo /usr/share/tomcat7/bin/startup.sh
Using CATALINA_BASE: /usr/share/tomcat7
Using CATALINA_HOME: /usr/share/tomcat7
Using CATALINA_TMPDIR: /usr/share/tomcat7/temp
Using JRE_HOME: /usr
Using CLASSPATH: /usr/share/tomcat7/bin/bootstrap.jar:/usr/share/tomcat7/bin/tomcat-juli.jar
Tomcat started.
Run Code Online (Sandbox Code Playgroud)
浏览到localhost:8080(和http://127.0.0.1:8080, http://127.0.0.1, http://[my network ip here]):
Oops! Google Chrome could not connect to localhost:8080
Run Code Online (Sandbox Code Playgroud)
停止 tomcat 也会失败:
$ sudo /usr/share/tomcat7/bin/shutdown.sh
Using CATALINA_BASE: /usr/share/tomcat7 …Run Code Online (Sandbox Code Playgroud)