Apache Tomcat 7 (7.0.59) – Tomcat Setup

Apache Tomcat 7 (7.0.59) – Tomcat Setup

Tomcat can be run as a daemon using the jsvc tool from the commons-daemon project. Source tarballs for jsvc are included with the Tomcat binaries, and need to be compiled. Building jsvc requires a C ANSI compiler (such as GCC), GNU Autoconf, and a JDK.

Before running the script, the JAVA_HOME environment variable should be set to the base path of the JDK. Alternately, when calling the ./configure script, the path of the JDK may be specified using the –with-java parameter, such as ./configure –with-java=/usr/java.

Using the following commands should result in a compiled jsvc binary, located in the $CATALINA_HOME/bin folder. This assumes that GNU TAR is used, and that CATALINA_HOME is an environment variable pointing to the base path of the Tomcat installation.

Please note that you should use the GNU make (gmake) instead of the native BSD make on FreeBSD systems.

via Apache Tomcat 7 (7.0.59) – Tomcat Setup.

Tomcat Servlet Container user discussion

Tomcat Servlet Container user discussion


We are trying to run tomcat7 as a daemon using JSVC in SunOS environment.

The compiled jsvc executable is owned by root. We have modified daemon.sh

that bundles with tomcat7 for our environment to run our tomcat instance.

When we execute this shell script, it creates two processes and both the

processes are owned by root as shown below (output of ps -ef | grep jsvc):

root 9109 9108 2 15:15:03 ? 0:37

/doc/dmadmin6/product/tomcat7/bin/jsvc -java-home


root 9108 1 0 15:15:03 ? 0:00

/doc/dmadmin6/product/tomcat7/bin/jsvc -java-home


We are running the shell script as a non privileged user (dmadmin6) and we

are even passing this user name with -user switch to jsvc. We were

expecting the child process (pid 9109) to be run as a non privileged user

(dmadmin6) in our case. Anyone else has experienced this?

Currently in production we have tomcat 6 configured to run with jsvc and in

that environment we see that the child process is running as a non

privileged user.

via Tomcat Servlet Container user discussion.