阿里云centos6.8安装tomcat的问题

2019-01-02 21:28发布

问题:

1.安全组设置了
2.防火墙设置了
3.jdk环境安装好了

[root@iZwz937wnzgbkdrindveyeZ apache-tomcat-8.5.35-src]# java -version
java version "11.0.1" 2018-10-16 LTS
Java(TM) SE Runtime Environment 18.9 (build 11.0.1+13-LTS)
Java HotSpot(TM) 64-Bit Server VM 18.9 (build 11.0.1+13-LTS, mixed mode)

4.tomcat服务成功启动

[root@iZwz937wnzgbkdrindveyeZ examples]# ps -ef | grep tomcat
root      2170  1527  0 17:12 pts/1    00:00:00 grep tomcat

5.浏览器输入http://120.77.36.91/8080

另外,为什么shutdown.sh的时候会有报错

[root@iZwz937wnzgbkdrindveyeZ bin]# ./shutdown.sh 
Using CATALINA_BASE:   /usr/local/tomcat/apache-tomcat-8.5.35-src
Using CATALINA_HOME:   /usr/local/tomcat/apache-tomcat-8.5.35-src
Using CATALINA_TMPDIR: /usr/local/tomcat/apache-tomcat-8.5.35-src/temp
Using JRE_HOME:        /usr/java/jdk-11.0.1
Using CLASSPATH:       /usr/local/tomcat/apache-tomcat-8.5.35-src/bin/bootstrap.jar:/usr/local/tomcat/apache-tomcat-8.5.35-src/bin/tomcat-juli.jar
NOTE: Picked up JDK_JAVA_OPTIONS:  --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.io=ALL-UNNAMED --add-opens=java.rmi/sun.rmi.transport=ALL-UNNAMED
Error: Could not find or load main class org.apache.catalina.startup.Bootstrap
Caused by: java.lang.ClassNotFoundException: org.apache.catalina.startup.Bootstrap

结果:无法访问此网站

回答1:

tomcat Could not find or load main class org.apache.catalina.startup.Bootstrap



回答2:

centos7 配置tomcat8 : https://faceghost.com/article/885301

centos7 配置 多个tomcat8 ---> https://faceghost.com/article/775311



回答3:

友情提示,你的端口需要在阿里的控制台进行开放



回答4:

首先,你的访问地址http://120.77.36.91/8080  有问题,端口和IP以:连接而不是斜杠 其次shutdown的时候也是会有日志输出的,这是正常现象



标签: