You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@tomee.apache.org by bu...@apache.org on 2012/07/24 02:18:40 UTC

svn commit: r826753 - in /websites/staging/openejb/trunk: cgi-bin/ content/ content/unix-daemon.html

Author: buildbot
Date: Tue Jul 24 00:18:40 2012
New Revision: 826753

Log:
Staging update by buildbot for openejb

Modified:
    websites/staging/openejb/trunk/cgi-bin/   (props changed)
    websites/staging/openejb/trunk/content/   (props changed)
    websites/staging/openejb/trunk/content/unix-daemon.html

Propchange: websites/staging/openejb/trunk/cgi-bin/
------------------------------------------------------------------------------
--- cms:source-revision (original)
+++ cms:source-revision Tue Jul 24 00:18:40 2012
@@ -1 +1 @@
-1364752
+1364852

Propchange: websites/staging/openejb/trunk/content/
------------------------------------------------------------------------------
--- cms:source-revision (original)
+++ cms:source-revision Tue Jul 24 00:18:40 2012
@@ -1 +1 @@
-1364752
+1364852

Modified: websites/staging/openejb/trunk/content/unix-daemon.html
==============================================================================
--- websites/staging/openejb/trunk/content/unix-daemon.html (original)
+++ websites/staging/openejb/trunk/content/unix-daemon.html Tue Jul 24 00:18:40 2012
@@ -147,15 +147,59 @@
 </h1>
 </div>
 
-<p>TomEE can be run as a daemon using the jsvc tool from the commons-daemon project. Source tarballs for jsvc are included with the TomEE binaries, and need to be compiled. Building jsvc requires a C ANSI compiler (such as GCC), GNU Autoconf, and a JDK.</p>
+<p>Apache TomEE can be run as a daemon using the <a href="http://commons.apache.org/daemon/jsvc.html">jsvc</a> tool from the <a href="http://commons.apache.org/daemon">Apache Commons Daemon</a> project.</p>
 
-<p>Before running the script, the <code>JAVA_HOME</code> environment variable should be set to the base path of the JDK. Alternately, when calling the <code>./configure</code> script, the path of the JDK may be specified using the <code>--with-java</code> parameter, such as <code>./configure --with-java=/usr/java</code>.</p>
+<p>Source tarballs for <code>jsvc</code> are included with Tomcat and therefore can be found in TomEE as well.  These need to be compiled before jsvc can be used. 
+Building jsvc requires a C ANSI compiler (such as GCC), GNU Autoconf, and a JDK.</p>
 
-<p>Using the following commands should result in a compiled jsvc binary, located in the <code>$TOMEE_HOME/bin</code> folder. This assumes that GNU TAR is used, and that <code>TOMEE_HOME</code> is an environment variable pointing to the base path of the TomEE installation.</p>
+<h1>Building jsvc</h1>
 
-<p>Please note that you should use the GNU make (gmake) instead of the native BSD make on FreeBSD systems.</p>
+<p>First, we'll need to locate and unpack the <code>commons-daemon-native.tar.gz</code></p>
 
-<h1>Building</h1>
+<pre><code>cd $TOMEE_HOME/bin
+tar xzvf commons-daemon-native.tar.gz
+cd commons-daemon-1.0.7-native-src/unix/
+</code></pre>
+
+<p>Note that the <code>commons-daemon-1.0.7-native-src</code> directory may have a slightly different version number.</p>
+
+<p>Second, we'll need to build the <code>jsvc</code> binary.  Under a UNIX operating system you will need:</p>
+
+<ul>
+<li>An ANSI-C compliant compiler (GCC is good)</li>
+<li>GNU Make</li>
+<li>A Java Platform 2 compliant SDK</li>
+</ul>
+
+<p>You have to specify the <code>JAVA_HOME</code> of the SDK either with the <code>--with-java=&lt;dir&gt;</code> parameter or set the <code>JAVA_HOME</code> environment to 
+point to your SDK installation. For example:</p>
+
+<pre><code>./configure --with-java=/usr/java
+</code></pre>
+
+<p>or</p>
+
+<pre><code>export JAVA_HOME
+./configure
+</code></pre>
+
+<p>If your operating system is supported, configure will go through cleanly, otherwise it will report an error (please send us the details of your 
+OS/JDK, or a patch against the sources). To build the binaries and libraries simply do:</p>
+
+<pre><code>make
+</code></pre>
+
+<p>This will generate the executable file <code>jsvc</code>.</p>
+
+<p>Finally, we'll want to set the execution bits and move the <code>jsvc</code> binary</p>
+
+<pre><code>chmod 755 jsvc
+mv jsvc $TOMEE_HOME/bin
+</code></pre>
+
+<p>Done!</p>
+
+<p>As one script, the above might look like:</p>
 
 <pre><code>cd $TOMEE_HOME/bin
 tar xzvf commons-daemon-native.tar.gz
@@ -166,8 +210,6 @@ chmod 755 jsvc
 mv jsvc ../..
 </code></pre>
 
-<p>Note that the <code>commons-daemon-1.0.7-native-src</code> directory may have a slightly different version number.</p>
-
 <h1>Starting (unix)</h1>
 
 <pre><code>sudo "$TOMEE_HOME/bin/jsvc" -cp "$TOMEE_HOME/bin/bootstrap.jar:$TOMEE_HOME/bin/tomcat-juli.jar" \
@@ -195,7 +237,7 @@ mv jsvc ../..
 
 <p>Note that <code>\</code> at the end of each line is unix syntax to keep everything effectively as one line and one command.  The command is simply too long to show as one line on a fixed width html page.  The <code>\</code> can be removed as long as the resulting command is one long line.</p>
 
-<h1>Issues</h1>
+<h1>Common Issues</h1>
 
 <p>Ensure your <code>$TOME_HOME</code> and <code>$JAVA_HOME</code> variables are set correctly.  You should see similar output with the following two commands</p>
 
@@ -209,8 +251,21 @@ $ ls $JAVA_HOME
 bin bundle  lib man
 </code></pre>
 
+<p>The <code>jsvc -debug</code> option can also show useful information for troubleshooting:</p>
+
+<pre><code>$TOMEE_HOME/bin/jsvc -debug
+</code></pre>
+
 <p>Note on OSX, <code>$JAVA_HOME</code> should be set to <code>/System/Library/Frameworks/JavaVM.framework/Home</code></p>
 
+<h1>Further documentation</h1>
+
+<p>See also the full Apache Commons Daemon documentation for jsvc.</p>
+
+<ul>
+<li><a href="http://commons.apache.org/daemon/jsvc.html">http://commons.apache.org/daemon/jsvc.html</a></li>
+</ul>
+