JavaScript is required to for searching.
Skip Navigation Links
Exit Print View
Oracle Solaris Cluster Data Service for Apache Tomcat Guide     Oracle Solaris Cluster
search filter icon
search icon

Document Information

Preface

1.  Installing and Configuring Oracle Solaris Cluster HA for Apache Tomcat

A.  Deployment Example: Installing Apache Tomcat in the Global Zone

B.  Deployment Example: Installing Apache Tomcat in a Failover Zone

Target Cluster Configuration

Software Configuration

Assumptions

Installing and Configuring Apache Tomcat on Global Storage in the Failover Zone

Example: Preparing the Cluster for Apache Tomcat

Example: Configuring Cluster Resources for Apache Tomcat

Example: Configuring the Failover Zone

Example: Installing the Apache Tomcat Software on Shared Storage

Example: Modifying the Apache Tomcat Configuration Files

Example: Enabling the Apache Tomcat Software to Run in the Cluster

C.  Deployment Example: Installing Apache Tomcat in a Non-Global Zone

Index

Example: Installing the Apache Tomcat Software on Shared Storage

These steps illustrate how to install the Apache Tomcat software in the directory /tomcat. As long as only one node is mentioned it needs to be the node where your resource group is online.

  1. Log in to the zone.
    phys-schost-1# zlogin clu1
  2. Add the tomcat group and user.
    zone# groupadd -g 1000 tomcat
    zone# useradd -g 1000 -d /tomcat -m -s /bin/ksh tomcat
  3. Install the Apache Tomcat binaries.
    zone# su - tomcat
    zone# gzcat apache-tomcat-5.5.17.tar.gz|tar xvf -
    zone# gzcat apache-tomcat-5.5.17-compat.tar.gz|tar xvf -
  4. Create your environment script /tomcat/env.kshwith the following contents.
    zone# cat env.ksh 
    #!/usr/bin/ksh
    JAVA_HOMME=/usr/j2se
    CATALINA_HOME=/tomcat/apache-tomcat-5.5.17
    export JAVA_HOME CATALINA_HOME
  5. Copy the Apache Tomcat configuration file from the agent directory to its deployment location.
    zone# cp /opt/SUNWsctomcat/bin/pfile /tomcat
    zone# chown tomcat:tomcat /tomcat/pfile
  6. Add this cluster's information to the parameter file /tomcat/pfile.

    The following listing shows the relevant file entries and the values to assign to each entry.

    EnvScript=/tomcat/env.ksh
    User=tomcat
    Basepath=/tomcat/apache-tomcat-5.5.17
    Host=ha-host-1
    Port=8080
    TestCmd="get /index.jsp"
    ReturnString="CATALINA"
    Startwait=20

    As an alternative, you can use the following set of variables:

    EnvScript=/global/mnt3/tomcat/env.ksh
    User=tomcat
    Basepath=/global/mnt3/tomcat/apache-tomcat-5.5.17
    TestUrl="http://ha-host-1:8080/"
    ReturnString="CATALINA"
    Startwait=20
  7. Save and close the file.
  8. Leave the zone.