setenv.sh无法正常工作 [英] setenv.sh is not working

查看:168
本文介绍了setenv.sh无法正常工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我无法设置setenv.sh文件工作.谁能帮助我在服务器上进行设置.

I am unable to set setenv.sh file working. Can anyone help me to set it on server.

SETENVPATH="${CATALINA_BASE:-$CATALINA_HOME}" if [ -r "$SETENVPATH/bin/setenv.sh" ]; then   . "$SETENVPATH/bin/setenv.sh"  elif [ -r "$CATALINA_HOME/bin/setenv.sh" ]; then  . "$CATALINA_HOME/bin/setenv.sh" fi

它可以在本地计算机上工作,但不能在服务器计算机上工作.

it's working on local machine but not in server machine.

推荐答案

我并不完全尝试使用这段代码,但是基本上,您只需要在bin目录中创建setenv.sh文件即可.您的tomcat安装程序,它将根据catalina.sh的这段代码自动使用:

I don't exactly what you are trying to do with this piece of code, but basically you just have to create the setenv.sh file in the bin directory of your tomcat install, and it will be used automatically, as per this code piece from catalina.sh :

# Ensure that any user defined CLASSPATH variables are not used on startup,
# but allow them to be specified in setenv.sh, in rare case when it is needed.
CLASSPATH=

if [ -r "$CATALINA_BASE/bin/setenv.sh" ]; then
  . "$CATALINA_BASE/bin/setenv.sh"
elif [ -r "$CATALINA_HOME/bin/setenv.sh" ]; then
  . "$CATALINA_HOME/bin/setenv.sh"
fi

好的一点是,您甚至不需要使其可执行. ;-)

And for the nice part you don't even need to make it executable. ;-)

否则,您能否提供更多详细信息,例如tomcat的安装路径和setenv.sh的安装位置? 再见.

Otherwise could you provide a bit more details, like the path where your tomcat is installed and the place where your setenv.sh is installed, please ? See you.

这篇关于setenv.sh无法正常工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆