https://blog.csdn.net/juniorkang/article/details/52872683
Execute chmod +x *.sh directly in the bin directory to add executable permissions to all script files
Then use the command sh startup.sh to start Tomcat
when starting
juniorkangdeMacBook-Pro:bin juniorkang$ ./startup.sh
-bash: ./startup.sh: Permission denied
Prompt no permission
Then changing the permissions to 777 doesn't work
juniorkangdeMacBook-Pro:bin juniorkang$ chmod 777 startup.sh
Still prompt not as follows!
juniorkangdeMacBook-Pro:bin juniorkang$ ./startup.sh
Cannot find ./catalina.sh
The file is absent or does not have execute permission
This file is needed to run this program
When prompted for this!
only use
juniorkangdeMacBook-Pro:bin juniorkang$ chmod +x *.sh
Then it works!
juniorkangdeMacBook-Pro:bin juniorkang$ sh startup.sh
Using CATALINA_BASE: /Users/juniorkang/Documents/jenkins/tomcat_jenkins
Using CATALINA_HOME: /Users/juniorkang/Documents/jenkins/tomcat_jenkins
Using CATALINA_TMPDIR: /Users/juniorkang/Documents/jenkins/tomcat_jenkins/temp
Using JRE_HOME: /Library/Java/JavaVirtualMachines/jdk1.8.0_101.jdk/Contents/Home
Using CLASSPATH: /Users/juniorkang/Documents/jenkins/tomcat_jenkins/bin/bootstrap.jar:/Users/juniorkang/Documents/jenkins/tomcat_jenkins/bin/tomcat-juli.jar
Tomcat started.