当前位置: 技术问答>linux和unix
ubuntu 10.04 tomcat启动不了
来源: 互联网 发布时间:2016-09-27
本文导语: 我到jdk已经安装了,可是启动不了tomcat请问为什么? wfq@wfq-laptop:~$ echo $JAVA_HOME /opt/jdk1.6.0_21 wfq@wfq-laptop:~$ sudo /opt/tomcat/bin/startup.sh Neither the JAVA_HOME nor the JRE_HOME environment variable is defined At least one of these e...
我到jdk已经安装了,可是启动不了tomcat请问为什么?
wfq@wfq-laptop:~$ echo $JAVA_HOME
/opt/jdk1.6.0_21
wfq@wfq-laptop:~$ sudo /opt/tomcat/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
|
你就手动设置一下把 下面是完整环境变量设置 追加到/etc/profile 然后执行source /etc/profile
然后再启动你的tomcat
export JAVA_HOME=/opt/jdk1.6.0_21
export PATH=$PATH:$JAVA_HOME/bin
export CLASSPATH=.:$JAVA_HOME/jre/lib:$JAVA_HOME/lib:$JAVA_HOME/lib/tools.jar
export TOMCAT_HOME=/opt/tomcat
export CATALINA_HOME=/opt/tomcat
export CLASSPATH=$CLASSPATH:$CATALINA_HOME/common/lib
然后再启动你的tomcat
export JAVA_HOME=/opt/jdk1.6.0_21
export PATH=$PATH:$JAVA_HOME/bin
export CLASSPATH=.:$JAVA_HOME/jre/lib:$JAVA_HOME/lib:$JAVA_HOME/lib/tools.jar
export TOMCAT_HOME=/opt/tomcat
export CATALINA_HOME=/opt/tomcat
export CLASSPATH=$CLASSPATH:$CATALINA_HOME/common/lib