我在哪里可以找到 Elastic Beanstalk 中 Linux AMI 上的 Tomcat 7 安装文件夹?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/12280372/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Where can I find the Tomcat 7 installation folder on Linux AMI in Elastic Beanstalk?
提问by MikeW
I have a elastic beanstalk linux-tomcat ami instance with the sample application installed and working off the public dns. I'm able to ssh into the instance but cannot find where tomcat 7 lives (ie. the conf directory to edit server.xml). I've tried this with a 64 and 32 bit ami. Any ideas on where I might find this? I looked under:
我有一个弹性 beanstalk linux-tomcat ami 实例,其中安装了示例应用程序并使用公共 dns。我能够通过 ssh 进入实例,但找不到 tomcat 7 所在的位置(即编辑 server.xml 的 conf 目录)。我已经用 64 位和 32 位 ami 试过了。关于我在哪里可以找到这个的任何想法?我看了下:
/etc
/usr/share
I did find a elasticbeanstalk-tomcat7-deployment
file under tmp
(was empty).
我确实elasticbeanstalk-tomcat7-deployment
在tmp
(是空的)下找到了一个文件。
I did a:
我做了一个:
sudo yum install tomcat7
and the sample application is also being served up from :8080
and working on the public DNS. So I (think) have 2 tomcat servers running on the same beanstalk instance. In that case, I'm trying to find where the Tomcat 7 folders are (serving pages on port 80
).
示例应用程序也由:8080
公共 DNS提供服务并在公共 DNS 上运行。所以我(认为)有 2 个 tomcat 服务器在同一个 beanstalk 实例上运行。在这种情况下,我试图找到 Tomcat 7 文件夹的位置(在 port 上提供页面80
)。
采纳答案by David Levesque
Since late 2012, it is usually under /usr/share/tomcat7
.
自 2012 年底以来,它通常低于/usr/share/tomcat7
.
Prior to that, it was usually found under /opt/tomcat7
.
在此之前,它通常在/opt/tomcat7
.
回答by uchamp
Not sure if this would be helpful. I am using a similar Amazon Linux AMI, which has tomcat7 living under /usr/share/tomcat7.
不确定这是否会有所帮助。我正在使用类似的 Amazon Linux AMI,它的 tomcat7 位于 /usr/share/tomcat7 下。
If tomcat is already running on your machine you can try:
如果 tomcat 已经在您的机器上运行,您可以尝试:
ps -ef | grep tomcat
or
或者
ps -ef | grep java
to check where it's running from.
检查它从哪里运行。
回答by mwoodman
As of October 3, 2012, a new "Elastic Beanstalk for Java with Apache Tomcat 7" Linux x64 AMI deployed with the Sample Application has the install here:
截至 2012 年 10 月 3 日,使用示例应用程序部署的新“Elastic Beanstalk for Java with Apache Tomcat 7”Linux x64 AMI 已在此处安装:
/etc/tomcat7/
The /etc/tomcat7/tomcat7.conf file has the following settings:
/etc/tomcat7/tomcat7.conf 文件有以下设置:
# Where your java installation lives
JAVA_HOME="/usr/lib/jvm/jre"
# Where your tomcat installation lives
CATALINA_BASE="/usr/share/tomcat7"
CATALINA_HOME="/usr/share/tomcat7"
JASPER_HOME="/usr/share/tomcat7"
CATALINA_TMPDIR="/var/cache/tomcat7/temp"
回答by Vinicius Domingues Alvarenga
- If you want to find the webapp folder, it may be over here:
- 如果你想找到 webapp 文件夹,它可能在这里:
/var/lib/tomcat7/webapps/
/var/lib/tomcat7/webapps/
- But you also can type this to find it:
- 但是你也可以输入这个来找到它:
find / -name 'tomcat_version' -type d
find / -name 'tomcat_version' -type d
回答by Sileria
Following environment variables worked for me on Debian Wheezy 7 and Tomcat 7:
以下环境变量在 Debian Wheezy 7 和 Tomcat 7 上对我有用:
CATALINA_HOME=/usr/share/tomcat7
CATALINA_BASE=/var/lib/tomcat7
CATALINA_TMPDIR=/tmp/tomcat7
(I did create /tmp/tomcat7 manually)
(我确实手动创建了 /tmp/tomcat7)
回答by sector7
Use "whereis" command.
使用“whereis”命令。
$ whereis tomcat8
tomcat8: /usr/sbin/tomcat8 /etc/tomcat8 /usr/libexec/tomcat8 /usr/share/tomcat8
$ whereis tomcat8
tomcat8: /usr/sbin/tomcat8 /etc/tomcat8 /usr/libexec/tomcat8 /usr/share/tomcat8
回答by RushProGlobal
As of 6-6-15 the Web Root location is at /tmp/deployment/application/ROOT using Tomcat.
从 6-6-15 开始,Web Root 位置使用 Tomcat 位于 /tmp/deployment/application/ROOT。
回答by Aleksandar Pavi?
In my case on Ubuntu 16.04 server, and default tomcat installation it's under:
在我的情况下,在 Ubuntu 16.04 服务器上,默认的 tomcat 安装位于:
/var/lib/tomcat8