Christian,

On 30.7.2013 11:58, Christian Schneider wrote:
But what about:
* set env. variables (maybe: catalina.sh?, /etc/profiles?)

/etc/profiles is executed when you enter bash shell, so if Tomcat starts at boot time, it won't be able to access environment variables defined in /etc/profile.

I set JAVA_HOME, CATALINA_BASE and CATALINA_HOME environment variables in /etc/init.d/tomcat (which is a copy of daemon.sh), but I guess there may be a better place to do that.

This link [1] recommends to put environment variables in /etc/default/tomcat, and then to source them from /etc/init.d/tomcat.


* adjust the heap size

Create file $CATALINA_BASE/bin/setenv.sh:

----
export CATALINA_OPTS='-Xms...m -Xmx...m'
----


* logging to the right directory (like: /var/log/tomcat/...)

Maybe something like:

ln -s /var/log/tomcat $CATALINA_BASE/logs


* specifying the User: "tomcat"

User 'tomcat' is already specified in daemon.sh, though you may override that with $TOMCAT_USER environment variable.

-Ognjen

[1] http://unix.stackexchange.com/questions/44370/how-to-make-unix-service-see-environment-variables

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to