1

I have installed apache-tomcat 8.0.30 in etc folder. How can I find the tomcat's user directory in ubuntu?

Which one is tomcat's user directory? what is meant by user directory? is it the configuration directory? temp directory?there are so many directories.

I am following an instruction on a tutorial and it say's tomcat's user directory but I am not sure which directory it means.

Also when I install tomcat in etc folder, does it create a directory in /usr/share/tomcat{X} ? because there was none but I created it and I don't think the tutorial means this folder because it was not created during installation.

thanks!

ubuntuser
  • 71
  • 1
  • 2
  • 6
  • then which one is tomcat's user directory? what is meant by user directory? is it the configuration directory? temp directory?there are so many directories. – ubuntuser Jan 01 '16 at 14:59
  • Since no one else appears to be able to give you a correct answer, the home directory is specified in the /etc/passwd file. Find the entry for the tomcat user and the home directory will be listed as the second to last value. In my install, that is /var/lib/tomcat8 but yours may be different. For everyone else, the tomcat user that OP is referring to is the user account under which the tomcat service is run. – PeterToTheThird Dec 31 '22 at 20:42
  • You can also simply type echo ~<username> to display the user's home directory. In the case of the tomcat8 user, this would be echo ~tomcat8 – PeterToTheThird Jan 02 '23 at 15:32

1 Answers1

0

There are three important directories for Tomcat:

 /etc/tomcat{X} for configuration 

 /etc/tomcat{X} for runtime, called CATALINA_HOME

 /usr/share/tomcat{X}-root for webapps

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

It should work

  • so which is the user directory? – ubuntuser Jan 02 '16 at 10:08
  • it depends what you're looking for. If your apps, it should be in share – piotrek1543 Jan 02 '16 at 10:10
  • hi, thanks for replies, during installation no folder was created in /usr/share? – ubuntuser Jan 02 '16 at 12:15
  • you're using the latest version of tomcat, so check Catalina_home I mean 'etc/tomcat', there might be already your webapps – piotrek1543 Jan 02 '16 at 12:21
  • i found the webapps folder but this is not the problem. i am following a tutorial that says- mkdir /usr/share/tomcat7/.sfile ln -s /etc/myfolder/file.name /usr/share/tomcat7/.sfile -now as i installed apache-tomcat-8.0.30 in /opt/apache-tomcat-8.0.30 I don't have tomcat7 folder in the /usr/share, so how to proceed with the symlink steps as instructed by the tutorial? – ubuntuser Jan 02 '16 at 12:53
  • find tutorial with tomcat8. I don't think you neex to add this link – piotrek1543 Jan 02 '16 at 12:59