I just install tomcat7
on my Ubuntu 12.04
using:
sudo apt get-install tomcat7
Immediately afterwards I notice that although $CATALINA_HOME and $CATALINA_BASE are set in the script /etc/init.d/tomcat7
, they are not exported on my shell. I.e. printenv | grep CATALINA
yields nothing.
So the question is: should I bother or is it a good practice to also set $CATALINA_HOME
and $CATALINA_BASE
in my .bashrc
and what would be the benefit?
No, you shouldn't. These variables are set just in case you install Tomcat manually, using deb packages is an unnecessary step since they are already set by the init script. The reason why you don't find the variables set in your bash shell, is because they are managed internally by the user that runs tomcat. The only reason to set such variables is to tell where tomcat files are while you install tomcat manually.