Tomcat安装好后,权限问题导致tomcat报错不能启动
1、找不到这个文件
2、deny问题
3、关联启动sh文件找不到(或没有可执行权限)导致tomcat不能启动
找不到问题:通过添加path权限可以解决
deny问题:最大可能是没有可执行权限,通过
sudo chmod +777 xxx.sh
关联启动sh文件找不到(或没有可执行权限):
zuoyiqundeMacBook-Pro:~ zuoyiqun$ sh startup.sh
Cannot find ./catalina.sh
The file is absent or does not have execute permission
This file is needed to run this program
总的解决方案:
1、在path中添加
# 配置本地Tomcat home位置begin
export PATH=${PATH}:/Users/zuoyiqun/Documents/JAVA/apache_tomcat_8_5_20/bin
# 配置本地Tomcat home位置end
2、添加可执行权限
sudochmod 777 /Users/zuoyiqun/Documents/JAVA/apache_tomcat_8_5_20/bin/catalina.sh
sudochmod 777 /Users/zuoyiqun/Documents/JAVA/apache_tomcat_8_5_20/bin/shutdown.sh
udochmod 777 /Users/zuoyiqun/Documents/JAVA/apache_tomcat_8_5_20/bin/startup.sh