Sitelet https://web.archive.org/web/20201213030936/https://github.com/hansonwang99/JavaCollection/issues/1
Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

「软件安装手册」Tomcat配置快捷操作问题 #1

Open
bosspang opened this issue Aug 17, 2020 · 0 comments
Open

「软件安装手册」Tomcat配置快捷操作问题 #1

bosspang opened this issue Aug 17, 2020 · 0 comments

Comments

@bosspang
Copy link

@bosspang bosspang commented Aug 17, 2020

羊哥您好~作为小白首先十分十分感谢您出的软件安装文档,我在实践安装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

之后便能通过快捷指令service tomcat start进行tomcat启动了,最后再次感谢您的无私分享!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant
You can’t perform that action at this time.