如果我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.
浏览到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
停止tomcat也失败:
$ sudo /usr/share/tomcat7/bin/shutdown.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
Jul 03, 2014 7:15:55 PM org.apache.catalina.startup.ClassLoaderFactory validateFile
WARNING: Problem with directory [/usr/share/tomcat7/common/classes], exists: [false], isDirectory: [false], canRead: [false]
Jul 03, 2014 7:15:55 PM org.apache.catalina.startup.ClassLoaderFactory validateFile
WARNING: Problem with directory [/usr/share/tomcat7/common], exists: [false], isDirectory: [false], canRead: [false]
Jul 03, 2014 7:15:55 PM org.apache.catalina.startup.ClassLoaderFactory validateFile
WARNING: Problem with directory [/usr/share/tomcat7/server/classes], exists: [false], isDirectory: [false], canRead: [false]
Jul 03, 2014 7:15:55 PM org.apache.catalina.startup.ClassLoaderFactory validateFile
WARNING: Problem with directory [/usr/share/tomcat7/server], exists: [false], isDirectory: [false], canRead: [false]
Jul 03, 2014 7:15:55 PM org.apache.catalina.startup.ClassLoaderFactory validateFile
WARNING: Problem with directory [/usr/share/tomcat7/shared/classes], exists: [false], isDirectory: [false], canRead: [false]
Jul 03, 2014 7:15:55 PM org.apache.catalina.startup.ClassLoaderFactory validateFile
WARNING: Problem with directory [/usr/share/tomcat7/shared], exists: [false], isDirectory: [false], canRead: [false]
Jul 03, 2014 7:15:55 PM org.apache.catalina.startup.Catalina stopServer
SEVERE: Catalina.stop:
java.io.FileNotFoundException: /usr/share/tomcat7/conf/server.xml (No such file or directory)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(FileInputStream.java:146)
at org.apache.catalina.startup.Catalina.stopServer(Catalina.java:466)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.apache.catalina.startup.Bootstrap.stopServer(Bootstrap.java:370)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:457)
apt-get install tomcat7
安装损坏的 tomcat7 是什么意思 ?