This page covers lessons learned from installing LabKey Server on a Solaris Server

Install LabKey in a non-Global Zone

We recommend using a Whole Root Zone to run LabKey Server. The reasons for this are:

  1. You are able to install binary version of PostgreSQL (that can be downloaded directly from
  2. You are able to install JAVA in default location
  3. To install JSVC (Apache Commons Daemon), you will need to compile it from source. This means you will need to install modern versions of GCC, autoconf and m4. This is easiest to do via the Package Manager software.

How to Configure Tomcat to run as a non-root user.

Building Apache Commons Daemon on Solaris (ie JSVC)

The Apache Commons Daemon allows you to run Tomcat on port 80/443 as a user other than root. This is our recommended configuration. The Apache Commons Daemon is shipped as part of the Tomcat distribution file and must be compiled from source. To compile the Daemon, you will need to install

  • GCC
  • Autoconf
  • m4
  • libsigsegv
The Apache Commons Daemon distribution is located in the `bin` directory of your Tomcat installation. To compile you will need to perform the following

tar xzf commons-daemon-1.0.5-native-src.tar.gz
cd commons-daemon-1.0.5-native-src/unix

Create a Tomcat Start script using the Apache Commons Daemon

A sample script is locate with the Apache Commons Daemon distribution, in the samples directory. If you are using Tomcat 5.5 or Tomcat 6.x, you should use the script named``. Edit this script to fit your installation. The following variables will need to be changed

  • `JAVA_HOME`:
  • `DAEMON_HOME`: This is usually `$CATALINA_HOME/bin/commons-daemon-1.0.5-native-src`
  • `TOMCAT_USER`: The user that you want run the Tomcat server as
Save it to reasonable location, such as `/usr/local/bin/`.

Test the script on the command-line, as root, to ensure that you can successfully start the Tomcat server.

Configuring the Tomcat Server to run as a service.

Now that you have created the Tomcat start/stop script, you will need to configure Tomcat to run as a service (i.e., Tomcat will start at boot-time and can be managed via Service Admin (svcs))

Create the Service Manifest A sample service manifest is below. The example assumes the start/stop script is located at `/usr/local/bin/`

<?xml version="1.0"?>
<!DOCTYPE service_bundle SYSTEM "/usr/share/lib/xml/dtd/service_bundle.dtd.1">
tomcat.xml : Sample Tomcat service manifest

<service_bundle type='manifest' name='Tomcat'>
<service name='application/web/tomcat' type='service' version='1'>

<single_instance />

timeout_seconds='30' />

timeout_seconds='30' />

<instance name='default' enabled='false' />

<stability value='Unstable' />

<loctext xml:lang='C'>Apache Tomcat</loctext>
<manpage title='tomcat' section='1' manpath='/usr/man' />


Edit this sample to fit your installation and save it to `/var/svc/manifest/application/web/tomcat.xml`

Import the Service Manifest

svccfg import /var/svc/manifest/application/web/tomcat.xml
To start tomcat you can now run
svcadm enable tomcat
To stop tomcat your would run
svcadm disable tomcat
To see the current status:
svcs -lp tomcat


expand all collapse all