TOMCAT-报错The BASEDIR environment variable is not defined correctly

时间:2025-03-01 17:02:03
The BASEDIR environment variable is not defined correctly 启动tomcat时报错 The BASEDIR environment variable is not defined correctly This environment variable is needed to run this program 这坑爹的中间件,害的我搞了半天 根据提示开始排查环境变量设置 以下是JDK 与tomcat的环境变量 [root@localhost bin]# more /etc/profile JAVA_HOME=/usr/local/src/jdk1.6.0_32 JRE_HOME=$JAVA_HOME/jre CLASSPATH=.:$JAVA_HOME/lib/:$JAVA_HOME/lib/:$JAVA_HOME/jre/lib/ export JAVA_HOME CLASSPATH CATALINA_1_BASE=/apache-tomcat-6.0.35/ CATALINA_1_HOME=/apache-tomcat-6.0.35/ export CATALINA_1_BASE CATALINA_1_HOME 没啥错误,这害得我狠被动啊,无意中打了一个ls命了恍然大悟 [root@localhost bin]# ls -al 总计 688 d-w------- 2 root root 4096 02-22 14:53 . drwxr-xr-x 9 root root 4096 02-22 14:53 .. --w------- 1 root root 22705 11-28 18:20 --w------- 1 root root 11830 11-28 18:20 --w------- 1 root root 17708 11-28 18:20 --w------- 1 root root 2374 11-28 18:20 --w------- 1 root root 24172 11-28 18:20 --w------- 1 root root 199623 11-28 18:20 --w------- 1 root root 1342 11-28 18:20 --w------- 1 root root 2108 11-28 18:20 --w------- 1 root root 1689 11-28 18:20 --w------- 1 root root 55828 02-22 16:13 --w------- 1 root root 3150 11-28 18:20 --w------- 1 root root 4114 11-28 18:20 --w------- 1 root root 2108 11-28 18:20 --w------- 1 root root 1628 11-28 18:20 --w------- 1 root root 2109 11-28 18:20 --w------- 1 root root 2023 11-28 18:20 --w------- 1 root root 32277 11-28 18:20 --w------- 1 root root 249259 11-28 18:20 --w------- 1 root root 3479 11-28 18:20 --w------- 1 root root 3472 11-28 18:20 --w------- 1 root root 2113 11-28 18:20 --w------- 1 root root 1632 11-28 18:20 全部没有执行权限,赶紧赋权限 # chmod 777 -R bin/ [root@localhost bin]# nohup sh run & [1] 19004 [root@localhost bin]# nohup: appending output to “” [root@localhost bin]# tail -f 2012-2-22 16:26:47 deployDirectory 信息: Deploying web application directory examples 2012-2-22 16:26:47 .http11.Http11Protocol start 信息: Starting Coyote HTTP/1.1 on http-8080 2012-2-22 16:26:47 init 信息: JK: ajp13 listening on /0.0.0.0:8009 2012-2-22 16:26:47 start 信息: Jk running ID=0 time=0/15 config=null 2012-2-22 16:26:47 start 信息: Server startup in 466 m OK了 tomcat终于起来了,坑爹啊 下次上传时一定要注意权限!