我一直试图在浏览器localhost:8080上运行它,但它说“无法访问网站”,尽管它说Tomcat在终端中运行
我通过从网站下载二进制版本来安装它。
omnis-MacBook-Air:bin omni$ sudo ./startup.sh
Password:
Using CATALINA_BASE: /usr/local/apache-tomcat-8.0.36-src
Using CATALINA_HOME: /usr/local/apache-tomcat-8.0.36-src
Using CATALINA_TMPDIR: /usr/local/apache-tomcat-8.0.36-src/temp
Using JRE_HOME: /Library/Java/JavaVirtualMachines/jdk1.8.0_91.jdk/Contents/Home
Using CLASSPATH: /usr/local/apache-tomcat-8.0.36- src/bin/bootstrap.jar:/usr/local/apache-tomcat-8.0.36-src/bin/tomcat-juli.jar
Tomcat started.
这是Catalina.out
错误:无法找到或加载主类org.apache.catalina.startup.Bootstrap
错误:无法找到或加载主类org.apache.catalina.startup.Bootstrap
此处还有来自跑步的输出:
omnis-MacBook-Air:bin omni$ ps auxw | grep java
omni 4660 0.1 0.2 4287968 13996 ?? S 12Aug16 21:44.21 ../PlugIns/Java/jre/bin/java -XstartOnFirstThread -Xmx256m -Declipse.pluginCustomization = .. / .. / .. / customization.ini -Dosgi.configuration.area = .. / .. /../configuration-Dosgi.configuration.area.default = .. / .. / .. / configuration -Dosgi.instance.area = .. / .. / .. / workspace -Djava.awt.headless = true - Djava.library.path = .. / .. / .. / plugins / org.eclipse.equinox.launcher.cocoa.macosx.x86_64_ / eclipse _ .so -jar ../../。 ./plugins/org.eclipse.equinox.launcher_1.3.0.v20140415-2008.jar -os macosx -ws cocoa -arch x86_64 -nl en_US -disableApplicationUpdate -port 58088 -disableServiceFiltering omni 37621 0.0 0.0 2453628 988 s000 S + 6:35 pm 0:00.01 grep java
这是grep tomcat
omnis-MacBook-Air:bin omni$ ps auxw | grep tomcat
root 38084 0.1 1.0 6062688 80312 s000 S 8:54 am 0:15.59 /Library/Java/JavaVirtualMachines/jdk1.8.0_91.jdk/Contents/Home/bin/java -Djava.util.logging.config.file = / usr / local / apache-tomcat-8.0.36 / conf / logging.properties -Djava.util.logging.manager = org.apache.juli.ClassLoaderLogManager -Djdk.tls.ephemeralDHKeySize = 2048 -Djava.endorsed.dirs = / usr /local/apache-tomcat-8.0.36/endorsed -classpath /usr/local/apache-tomcat-8.0.36/bin/bootstrap.jar:/usr/local/apache-tomcat-8.0.36/bin/tomcat- juli.jar -Dcatalina.base = / usr / local / apache-tomcat-8.0.36 -Dcatalina.home = / usr / local / apache-tomcat-8.0.36 -Djava.io.tmpdir = / usr / local / apache -tomcat-8.0.36 / temp org.apache.catalina.startup.Bootstrap start omni 38396 0.0 0.0 2443388 956 s000 S + 6:35 pm 0:00.01 grep tomcat
答案 0 :(得分:0)
基于你的CATALINA_BASE我怀疑你下载并试图从src运行而不是实际构建
确保您正在下载Core distribution而不是src(除非您想自己构建)
然后尝试运行它并grep显示应该显示的tomcat