原因:
用户没有权限,而导致无法执行,
用命令chmod 修改一下bin目录下的.sh权限就可以了
[root@sunmmerwind bin]# ./startup.sh
-bash: ./startup.sh: Permission denied
[root@sunmmerwind bin]# chmod u+x *.sh
[root@sunmmerwind bin]# ./startup.sh
Using CATALINA_BASE: /MyProject/CodeGeneration/apache-tomcat-9.0.2
Using CATALINA_HOME: /MyProject/CodeGeneration/apache-tomcat-9.0.2
Using CATALINA_TMPDIR: /MyProject/CodeGeneration/apache-tomcat-9.0.2/temp
Using JRE_HOME: /MySoft/Java/jdk1.8.0_152
Using CLASSPATH: /MyProject/CodeGeneration/apache-tomcat-9.0.2/bin/bootstrap.jar:/MyProject/CodeGeneration/apache-tomcat-9.0.2/bin/tomcat-juli.jar
Tomcat started.