[linux] Where can I find the Tomcat 7 installation folder on Linux AMI in Elastic Beanstalk?

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:

/etc
/usr/share

I did find a elasticbeanstalk-tomcat7-deployment file under tmp (was empty).

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).

This question is related to linux tomcat amazon-elastic-beanstalk

The answer is


My server is CentOS 7, and I install tomcat by:

sudo yum install tomcat
sudo yum install tomcat-webapps tomcat-admin-webapps

I found my webapps folders in:

/usr/share/tomcat/

and

/var/lib/tomcat/

  • If you want to find the webapp folder, it may be over here:

/var/lib/tomcat7/webapps/

  • But you also can type this to find it:

find / -name 'tomcat_version' -type d


As of 6-6-15 the Web Root location is at /tmp/deployment/application/ROOT using Tomcat.


Not sure if this would be helpful. I am using a similar Amazon Linux AMI, which has tomcat7 living under /usr/share/tomcat7.

If tomcat is already running on your machine you can try:

ps -ef | grep tomcat

or

ps -ef | grep java

to check where it's running from.


In my case on Ubuntu 16.04 server, and default tomcat installation it's under:

/var/lib/tomcat8

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:

/etc/tomcat7/

The /etc/tomcat7/tomcat7.conf file has the following settings:

# 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"

Following environment variables worked for me on Debian Wheezy 7 and Tomcat 7:

CATALINA_HOME=/usr/share/tomcat7
CATALINA_BASE=/var/lib/tomcat7
CATALINA_TMPDIR=/tmp/tomcat7

(I did create /tmp/tomcat7 manually)


Use "whereis" command.

$ whereis tomcat8
tomcat8: /usr/sbin/tomcat8 /etc/tomcat8 /usr/libexec/tomcat8 /usr/share/tomcat8


Examples related to linux

grep's at sign caught as whitespace How to prevent Google Colab from disconnecting? "E: Unable to locate package python-pip" on Ubuntu 18.04 How to upgrade Python version to 3.7? Install Qt on Ubuntu Get first line of a shell command's output Cannot connect to the Docker daemon at unix:/var/run/docker.sock. Is the docker daemon running? Run bash command on jenkins pipeline How to uninstall an older PHP version from centOS7 How to update-alternatives to Python 3 without breaking apt?

Examples related to tomcat

Jersey stopped working with InjectionManagerFactory not found The origin server did not find a current representation for the target resource or is not willing to disclose that one exists. on deploying to tomcat Spring boot: Unable to start embedded Tomcat servlet container Tomcat 404 error: The origin server did not find a current representation for the target resource or is not willing to disclose that one exists Spring Boot application in eclipse, the Tomcat connector configured to listen on port XXXX failed to start Kill tomcat service running on any port, Windows Tomcat 8 is not able to handle get request with '|' in query parameters? 8080 port already taken issue when trying to redeploy project from Spring Tool Suite IDE 403 Access Denied on Tomcat 8 Manager App without prompting for user/password Difference between Xms and Xmx and XX:MaxPermSize

Examples related to amazon-elastic-beanstalk

Difference between Amazon EC2 and AWS Elastic Beanstalk Where can I find the Tomcat 7 installation folder on Linux AMI in Elastic Beanstalk? How can I commit a single file using SVN over a network? SSH to Elastic Beanstalk instance