<span style="font-size:18px;">The BASEDIR environment variable is not defined correctly</span>
启动tomcat时报错
<strong>The BASEDIR environment variable is not defined correctly
This environment variable is needed to run this program</strong>
这坑爹的中间件,害的我搞了半天 根据提示开始排查环境变量设置
以下是JDK 与tomcat的环境变量
[root@localhost bin]# more /etc/profile
JAVA_HOME=/usr/local/src/jdk1..0_32
JRE_HOME=$JAVA_HOME/jre
CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar:$JAVA_HOME/jre/lib/rt.jar
export JAVA_HOME CLASSPATH
CATALINA_1_BASE=/apache-tomcat-6.0./
CATALINA_1_HOME=/apache-tomcat-6.0./
export CATALINA_1_BASE CATALINA_1_HOME
没啥错误,这害得我狠被动啊,无意中打了一个ls命了恍然大悟
[root@localhost bin]# ls -al
总计
d-w------- root root - : .
drwxr-xr-x root root - : ..
--w------- root root - : bootstrap.jar
--w------- root root - : catalina.bat
--w------- root root - : catalina.sh
--w------- root root - : catalina-tasks.xml
--w------- root root - : commons-daemon.jar
--w------- root root - : commons-daemon-native.tar.gz
--w------- root root - : cpappend.bat
--w------- root root - : digest.bat
--w------- root root - : digest.sh
--w------- root root - : nohup.out
--w------- root root - : setclasspath.bat
--w------- root root - : setclasspath.sh
--w------- root root - : shutdown.bat
--w------- root root - : shutdown.sh
--w------- root root - : startup.bat
--w------- root root - : startup.sh
--w------- root root - : tomcat-juli.jar
--w------- root root - : tomcat-native.tar.gz
--w------- root root - : tool-wrapper.bat
--w------- root root - : tool-wrapper.sh
--w------- root root - : version.bat
--w------- root root - : version.sh
全部没有执行权限,赶紧赋权限
# chmod -R bin/
[root@localhost bin]# nohup sh catalina.sh run &
[]
[root@localhost bin]# nohup: appending output to “nohup.out”
[root@localhost bin]# tail -f nohup.out
-- :: org.apache.catalina.startup.HostConfig deployDirectory
信息: Deploying web application directory examples
-- :: org.apache.coyote.http11.Http11Protocol start
信息: Starting Coyote HTTP/1.1 on http-
-- :: org.apache.jk.common.ChannelSocket init
信息: JK: ajp13 listening on /0.0.0.0:
-- :: org.apache.jk.server.JkMain start
信息: Jk running ID= time=/ config=null
-- :: org.apache.catalina.startup.Catalina start
信息: Server startup in m
OK了 tomcat终于起来了,坑爹啊 下次上传时一定要注意权限!