Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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?

share|improve this question
add comment

1 Answer 1

up vote 2 down vote accepted

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.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.