CentOS启动Tomcat时报错Neither the JAVA_HOME nor the JRE_HOME environment variable is defined

问题复现:

[root@tomcat ~]# tomcat-1/bin/startup.sh
Neither the JAVA_HOME nor the JRE_HOME environment variable is defined
At least one of these environment variable is needed to run this program

解决方法:

按照此篇文章安装JAVA环境即可。

https://www.19itmc.top/linux/centos-java-install.html