Tomcat和CATALINA_HOME [英] Tomcat and CATALINA_HOME

查看:169
本文介绍了Tomcat和CATALINA_HOME的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在搞砸Tomcat服务器,我觉得有些奇怪的事情发生了。我从apache网站下载了Tomcat 7(不是RPM但是tar.gz)。据了解,应该设置CATALINA_HOME和CATALINA_BASE环境变量,但是当我在终端上导出时,我看不到任何一个,但服务器通过bin / startup.sh启动,甚至说

 使用CATALINA_BASE:/home/andrzej/apache-tomcat-7.0.25 
使用CATALINA_HOME:/home/andrzej/apache-tomcat-7.0使用CLASSSPATH:/ home / andrzej / apache-tomcat-7.0.25 / bin / bootstrap.jar:/ home / andrzej /apache-tomcat-7.0.25/bin/tomcat-juli.jar

我认为另外一天的变量已经设置好了,但现在我试图用keytool来使用它们来生成证书,我注意到他们不在那里。
我错过了一些东西,因为即使我看不到它们,一切都可以正常工作(启动/关闭和使用tomcat的eclipse)?

解决方案

这些环境变量是可选的。如果系统上没有设置,Tomcat将根据当前运行的脚本( startup.sh 等)的位置设置一些默认值,这将是只要Tomcat正在运行。如果您知道Shell脚本语言,只需在编辑器中打开 catalina.sh 文件即可阅读。


I am messing with Tomcat server and I think some strange thing happened. I downloaded Tomcat 7 from apache website (not an RPM but tar.gz). As I understand there should be CATALINA_HOME and CATALINA_BASE environment variables set, but when I do export on my terminal I can't see any of them, but server starts fine through bin/startup.sh and it even says

Using CATALINA_BASE:   /home/andrzej/apache-tomcat-7.0.25
Using CATALINA_HOME:   /home/andrzej/apache-tomcat-7.0.25
Using CATALINA_TMPDIR: /home/andrzej/apache-tomcat-7.0.25/temp
Using JRE_HOME:        /usr/lib/jvm/jre
Using CLASSPATH:       /home/andrzej/apache-tomcat-7.0.25/bin/bootstrap.jar:/home/andrzej /apache-tomcat-7.0.25/bin/tomcat-juli.jar

I think that the other day variables were set, but now I tried to use them with keytool to generate certificate and I noticed they are not there. Am I missing something, because even if I can't see them everything works fine (startup/shutdown and eclipse with tomcat)?

解决方案

Those environment variables are optional. If there are none set on the system, Tomcat will just set some defaults based on the location of the currently running script (the startup.sh and so on), which will be used as long as Tomcat is running. If you know Shell script language, just open catalina.sh file in an editor and read it.

这篇关于Tomcat和CATALINA_HOME的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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