Based here I'm trying to setup Tomcat Server, I have successfully installed it and tested it. Then I stopped it as recommended in the tutorial. I'm setting up "New Server Runtime Environment" as you can see under Tomcat Installation Directory is a windows directory, anyone knows the Ubuntu directory equivalent for this? Thanks.
There are three important directories for Tomcat:
/etc/tomcat{X}
for configuration/usr/share/tomcat{X}
for runtime, called CATALINA_HOME/usr/share/tomcat{X}-root
for webappsThe alternative path to Tomcat, called CATALINA_BASE, is
/var/lib/tomcat{X}
The temp folder for Tomcat is
/tmp/tomcat{X}-tomcat{X}-tmp
All the above paths work for Tomcat 6, 7, and 8. Replace
{X}
with the appropriate Tomcat major version number, e.g./etc/tomcat8
.After installing Tomcat with
apt-get
on Ubuntu 12.04, Tomcat creates and uses these directories:/etc/tomcat6/
/usr/share/tomcat6
/usr/share/tomcat6-root/
/usr/share/doc/tomcat6
/var/cache/tomcat6
/var/lib/tomcat6
/var/log/tomcat6
/etc/default
If you install Tomcat 7 using apt:
Then the webapps are located in
/var/lib/tomcat7
for tomcat 7, if you are working with Intellij IDE:
Tomcat Home:
/usr/share/tomcat7
Tomcat base directory:
/var/lib/tomcat7
This is the default Tomcat home page, that can be found on the local file system at:
I installed
tomcat7
viaapt-get
, but its directory was not unliketomcat6
.It was located in
/usr/share/tomcat7
I have followed the Vogella tutorial to set up the Tomcat server, and I ran into the same issue. If you had installed tomcat7 using the instructions mentioned in the tutorial, just mention the below path in the Tomcat installation directory field, when setting up the server runtime environment in eclipse
/usr/share/tomcat7
When I proceeded with the above path, I faced another issue (Could not load the Tomcat server configuration), for which I executed the below commands in terminal and restarted Eclipse. (Source)
Assuming your are installing Tomcat 6, it will be at:
/usr/share/tomcat6
Simple, use linux
find
tool, (you might need to find assudo
user)I always forget where's the
webapps
is while deploying the war, this is my command,Apparently, it not the second one.
These are some of the key tomcat directories:
/bin
- Startup, shutdown, and other scripts. The *.sh files (for Unix systems) are functional duplicates of the *.bat files (for Windows systems). Since the Win32 command-line lacks certain functionality, there are some additional files in here./conf
- Configuration files and related DTDs. The most important file in here is server.xml. It is the main configuration file for the container./logs
- Log files are here by default./webapps
- This is where your webapps go.You may check where there are by the following commands:
Change
tomcat7
to your appropriate package name. By default for Tomcat7 it's usually/usr/share/tomcat7
.