解决CentOS下启动tomcat的Cannot find ./catalina.sh 的问题

从终端进入tomcat的bin目录,然后执行startup.sh


[root@localhost bin]# ./startup.sh
-bash: ./startup.sh: Permission denied
[root@localhost bin]# 
[root@localhost bin]# chmod u+x ./startup.sh 
[root@localhost bin]# ./startup.sh 
Cannot find ./catalina.sh
The file is absent or does not have execute permission
This file is needed to run this program
[root@localhost bin]# 
[root@localhost bin]# 
[root@localhost bin]# 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

报错原因:权限问题

解决:

[root@localhost bin]# chmod +x *.sh
[root@localhost bin]# sh startup.sh 
Using CATALINA_BASE:   /opt/apache-tomcat-7.0.94
Using CATALINA_HOME:   /opt/apache-tomcat-7.0.94
Using CATALINA_TMPDIR: /opt/apache-tomcat-7.0.94/temp
Using JRE_HOME:        /usr/local/src/java/jdk1.7.0_71
Using CLASSPATH:       /opt/apache-tomcat-7.0.94/bin/bootstrap.jar:/opt/apache-tomcat-7.0.94/bin/tomcat-juli.jar
Tomcat started.
[root@localhost bin]# 

已解决!

你可能感兴趣的:(Eclipse,Xshell等Tips,Linux)