今天安裝TOMCAT5,下載的是其ZIP安裝包,在Linux下unzip後,使用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成功啓動