You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
羊哥您好~作为小白首先十分十分感谢您出的软件安装文档,我在实践安装Tomcat中遇到了这个问题:
根据您P38页的教程,进⼊ /etc/rc.d/init.d ⽬录,编辑tomcat文件,保存后尝试使用快捷方式service tomcat start运行出现了如下bug提示: [leslie@localhost ~]$ service tomcat start Password: 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
经过相关查阅,发现是tomcat文件内缺少JAVA_HOME 与 JRE_HOME 环境变量的设置,完整tomcat文件配置代码如下:
#chkconfig:- 20 90
#description:tomcat
#processname:tomcat
export JAVA_HOME="=/usr/local/java/jdk1.8.0_161"
export JRE_HOME="=/usr/local/java/jdk1.8.0_161/jre"
TOMCAT_HOME=/usr/local/tomcat/apache-tomcat-8.5.55
case $1 in
start) su root $TOMCAT_HOME/bin/startup.sh;;
stop) su root $TOMCAT_HOME/bin/shutdown.sh;;
*) echo "require start|stop" ;;
esac
羊哥您好~作为小白首先十分十分感谢您出的软件安装文档,我在实践安装Tomcat中遇到了这个问题:
根据您P38页的教程,进⼊ /etc/rc.d/init.d ⽬录,编辑tomcat文件,保存后尝试使用快捷方式
service tomcat start
运行出现了如下bug提示:[leslie@localhost ~]$ service tomcat start Password: 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
经过相关查阅,发现是tomcat文件内缺少JAVA_HOME 与 JRE_HOME 环境变量的设置,完整tomcat文件配置代码如下:
之后便能通过快捷指令
service tomcat start
进行tomcat启动了,最后再次感谢您的无私分享!The text was updated successfully, but these errors were encountered: