今天在linux上部署tomcat 6.0.20,使用sh startup.sh启动tomcat,出现
Cannot find ./catalina.sh
This file is needed to run this program
Cannot find ./catalina.sh
This file is needed to run this program
然后又使用sh catalina.sh命令执行,结果
没有设置javahome,然后在catalina.sh里面添加:
JAVA_HOME=/usr/lib/jvm/jdk1.5.0_16;
JAVA_HOME=/usr/lib/jvm/jdk1.5.0_16;
再次执行sh catalina.sh,错误如下:
The BASEDIRenvironmentvariable is not defined correctly
This environmentvariable is needed to run this program
The BASEDIRenvironmentvariable is not defined correctly
This environmentvariable is needed to run this program
经过无数百度后,才发现那些.sh文件都不是可执行文件,于是找到命令:
chmod +x *.sh
chmod +x *.sh再次执行 sh catalina.sh通过,然后用sh startup.sh成功启动