Just how do I set environment variables?
The ideal area for this relies on just how and also where you've mounted Tomcat, what applications you intend to grab this setup and also just how international you desire the extent to be.
The Ubuntu documentation on Environment Variables reviews the benefits and drawbacks of the numerous alternatives.
In celebration you can set variables similar to this :
most various other coverings follow this convention, yet not all. You can set it completely in
~/.profile for celebration (and also as in the past, various other coverings have various other areas)
Environment variables need to currently function
If you are making use of the tomcat6 plan from the Ubuntu databases, after that the CATALINA_HOME and also various other environment variables are currently set, in the
/etc/init.d/tomcat6 start-up manuscript.
If you are mounting tomcat outside the plan supervisor (with any luck in/ decide or elsewhere outside the taken care of documents system), after that running the
TOMCAT/bin/startup.sh needs to make use of the loved one area to specify the CATALINA_HOME.
Establishing the Environment variable
If for one reason or another you still require to set a setting variable you can open an incurable window and also key in the command :
This setting variable will certainly currently function within that incurable window, yet if you open an additional window or logout/login you loose that setup.
Make the setting variable irreversible
To make the setting variable setup irreversible, there are numerous areas you can specify the setup.
To be actually certain the setup is being grabbed, add the above setup to among the start-up manuscript for tomcat :
Keep in mind : startup.sh telephone calls the catalina.sh. You need to add the setup at the beginning of among these documents (after any kind of first remarks)
The typical means for international environment variables would certainly be to add an access in
/etc/environment (you do not make use of the command export in this documents as it is not a regular celebration manuscript)
You can set the environment variables in the celebration (command line shell) arrangement documents, yet these are not advised as they are not constantly grabbed (eg. if you are running a web server that you do not login to to run tomcat) : ~/. bashrc | ~/. account | / etcbash.bashrc | / etc/profile