centos Tomcat无法正常启动,使用sudo可启动

centos 安装安装jdk7+tomcat7无法启动;

[root@localhost bin]# sh startup.sh 
Cannot find /user/local/tomcat/bin/setclasspath.sh
This file is needed to run this program

如果使用sudo sh startup.sh命令则可以正常启动tomcat

[root@localhost bin]# sudo sh startup.sh 
Using CATALINA_BASE:   /usr/local/tomcat
Using CATALINA_HOME:   /usr/local/tomcat
Using CATALINA_TMPDIR: /usr/local/tomcat/temp
Using JRE_HOME:        /usr
Using CLASSPATH:       /usr/local/tomcat/bin/bootstrap.jar:/usr/local/tomcat/bin/tomcat-juli.jar

 

 

/etc/profile配置如下;

export JAVA_HOME=/user/java/jdk1.7.0_25 
export CLASSPATH=.:$JAVA_HOME/jre/lib/rt.jar:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar  
export PATH=$JAVA_HOME/bin:$PATH

export CATALINA_HOME=/user/local/tomcat
export CLASSPATH=.:$CLASSPATH:$CATALINA_HOME/lib
export PATH=$PATH:$CATALINA_HOME/bin

你可能感兴趣的:(centos Tomcat无法正常启动,使用sudo可启动)