Skip Navigation Links | |
Exit Print View | |
![]() |
Oracle Solaris Cluster Data Service for Apache Tomcat Guide Oracle Solaris Cluster 4.0 |
1. Installing and Configuring Oracle Solaris Cluster HA for Apache Tomcat
Installing and Configuring Oracle Solaris Cluster HA for Apache Tomcat
Oracle Solaris Cluster HA for Apache Tomcat
Planning the Oracle Solaris Cluster HA for Apache Tomcat Installation and Configuration
Apache Tomcat and Solaris Zones
Oracle Solaris Cluster HA for Apache Tomcat as a scalable configuration
Oracle Solaris Cluster HA for Apache Tomcat as a multiple master configuration
Restriction to deploy Oracle Solaris Cluster HA for Apache Tomcat in a scalable configuration
Restriction for the Load_balancing_policy
Restriction for Scalable Services and Solaris Zones
Restriction for the Apache Tomcat smf Service Name in a Failover Zone
Restriction for Apache Tomcat 5.5.28, 6.0.28, 6.0.29, and 7.06
Location of the Tomcat Home Directory for Scalable or Multiple Masters Configurations
Load Balancing for Multiple Master Configurations
Location of the Tomcat Home Directory for Failover Configurations
Location of the wget Command for Apache Tomcat 5.5.28, 6.0.28, 6.0.29, and 7.06
Apache Tomcat Component Dependencies
HA for Apache Tomcat Configuration and Registration Files
Installing and Configuring Apache Tomcat
How to Enable Apache Tomcat to run in a Global Zone Configuration
How to Install and Configure Apache Tomcat in the Global Zone
How to Enable Apache Tomcat to run in Failover Zone Configuration
How to Install and Configure Apache Tomcat in a Failover Zone
Verifying the Installation and Configuration of Apache Tomcat
How to Verify the Installation and Configuration of Apache Tomcat
How to Deploy the Apache Tomcat Application
Installing the HA for Apache Tomcat Package
How to Install the HA for Apache Tomcat Package
Registering and Configuring Oracle Solaris Cluster HA for Apache Tomcat
How to Register and Configure Oracle Solaris Cluster HA for Apache Tomcat as a Failover Data Service
How to Register and Configure Oracle Solaris Cluster HA for Apache Tomcat as a Scalable Data Service
Configuring Oracle Solaris Cluster HA for Apache Tomcat in a Failover Zone
Configuring Oracle Solaris Cluster HA for Apache Tomcat in a Failover Zone
How to Register Oracle Solaris Cluster HA for Apache Tomcat in a Failover Zone
How to Modify Parameters in the Oracle Solaris Cluster HA for Apache Tomcat Manifest
How to Remove an Oracle Solaris Cluster HA for Apache Tomcat Resource From a Failover Zone
Verifying the Oracle Solaris Cluster HA for Apache Tomcat Installation and Configuration
How to Verify the Oracle Solaris Cluster HA for Apache Tomcat Installation and Configuration
Understanding the Oracle Solaris Cluster Apache Tomcat HA Parameter File
Structure of the Apache Tomcat HA parameter file
Strategy to Choose the TestCmd and the ReturnString Variable
Understanding Oracle Solaris Cluster HA for Apache Tomcat Fault Monitor
Probing Algorithm and Functionality
Debugging HA for Apache Tomcat
How to Activate Debugging for HA for Apache Tomcat
A. Deployment Example: Installing Apache Tomcat in the Global Zone
B. Deployment Example: Installing Apache Tomcat in a Failover Zone
This section contains the procedures you need to install and configure Apache Tomcat.
Determine how Apache Tomcat will be deployed in Oracle Solaris Cluster:
Determine which version of Apache Tomcat will be deployed.
Determine how many Apache Tomcat instances will be deployed.
Determine which Cluster File System will be used by each Apache Tomcat instance.
Determine the type of the target zone where you will install Apache Tomcat. Valid zone types include the global zone or the failover zone.
To install and configure Apache Tomcat in a global zone configuration, complete the following tasks:
How to Enable Apache Tomcat to run in a Global Zone Configuration
How to Install and Configure Apache Tomcat in the Global Zone
To install and configure Apache Tomcat in a failover zone configuration, complete the following tasks:
How to Enable Apache Tomcat to run in Failover Zone Configuration
How to Install and Configure Apache Tomcat in a Failover Zone
You will find installation examples for each zone type in:
Appendix A, Deployment Example: Installing Apache Tomcat in the Global Zone
Appendix B, Deployment Example: Installing Apache Tomcat in a Failover Zone
# clresourcetype register SUNW.gds SUNW.HAStoragePlus
Note - Perform this step only if you create a failover data service.
# clresourcegroup create Apache Tomcat-failover-resource-group
Note - Perform this step only if you create a failover data service.
# clresource create \ -g Apache-Tomcat-failover-resource-group \ -t SUNW.HAStoragePlus \ -p FilesystemMountPoints=Apache Tomcat- instance-mount-points Apache-Tomcat-has-resource
Note - Perform this step for a failover data service.
# clreslogicalhostname \ -g Apache Tomcat-failover-resource-group \ -h Apache Tomcat-logical-hostname Apache Tomcat-lh-resource
Note - Perform this step for a failover data service.
# clresourcegroup online -emM -n current-node Apache Tomcat-failover-resource-group
Note - Perform this step only if you create a multiple masters data service.
# clresourcegroup create \ -p Maximum_primaries=2 \ -p Desired_primaries=2 Apache-Tomcat-Scalable-resource-group
If you need more nodes, adjust Maximum_primaries and Desired_primaries to the appropriate value.
Note - Perform this step only if you create a multiple masters data service.
# clresource create \ -g Apache-Tomcat-failover-resource-group \ -t SUNW.HAStoragePlus \ -p FilesystemMountPoints=Apache Tomcat- instance-mount-points Apache-Tomcat-has-resource
Note - Perform this step only if you create a multiple masters data service.
# clresourcegroup online -emM Apache Tomcat-failover-resource-group
Note - Perform this step only if you create a scalable data service.
# clresourcegroup create Apache-Tomcat-SharedAddress-resource-group
Note - Perform this step only if you create a scalable data service.
# clressharedaddress create \ -g Apache-Tomcat-SharedAddress-resource-group \ -h Apache-Tomcat-SharedAddress-hostname \ Apache-Tomcat-SharedAddress-resource
Note - Perform this step only if you create a scalable data service.
# clresourcegroup online -emM Apache-Tomcat-SharedAddress-resource-group
Note - Perform this step only if you create a scalable data service.
# clresourcegroup create \ -p Maximum_primaries=2 \ -p Desired_primaries=2 \ -p RG_dependencies=Apache-Tomcat-SharedAddress-resource-group \ Apache-Tomcat-Scalable-resource-group
If you need more nodes, adjust Maximum_primaries and Desired_primaries to the appropriate value.
Note - Perform this step only if you create a scalable data service.
# clresource create Apache-Tomcat-has-resource \ -g Apache-Tomcat-scalable-group \ -t SUNW.HAStoragePlus \ -p FilesystemMountPoints=Apache Tomcat- instance-mount-points
Note - Perform this step only if you create a scalable data service.
# clresourcegroup online -emM Apache Tomcat-resource-group
Determine whether you will use Apache Tomcat as a failover or a multiple master, or a scalable data service.
For conceptual information on scalable and failover data services, see Oracle Solaris Cluster Concepts Guide.
Determine which user name will run Apache Tomcat.
Determine how many Apache Tomcat versions and instances will be deployed.
If more than one instance of a version will be deployed, determine whether they share the binaries.
Determine which Cluster File System will be used by each Apache Tomcat instance.
![]() | Caution - In this scenario, the deployment of the Tomcat group and user needs to occur on every node where Apache Tomcat is hosted. |
If Apache Tomcat is to run under a non root user, you have to create the appropriate user and the appropriate group. For these tasks, use the following commands.
# su — user-name
If you deploy Apache Tomcat as a failover data service, install Apache Tomcat onto a shared file system within Oracle Solaris Cluster.
You should install Apache Tomcat onto shared disks. For a discussion of the advantages and disadvantages of installing the software on a local versus a cluster file system, see Determining the Location of the Application Binaries in Oracle Solaris Cluster Data Services Planning and Administration Guide.
If you will deploy Apache Tomcat as a failover data service install the Apache Tomcat binaries on the shared storage on one node. If Apache Tomcat will be deployed as a scalable or a multiple master data service, install the Apache Tomcat binaries on the local storage on every node, that will host the Apache Tomcat data service.
Note - Refer to http://tomcat.apache.org/index.html for instructions about installing Apache Tomcat.
If you deploy Apache Tomcat as a scalable data service for a scalable or a multiple masters configuration, repeat the following step at every node that will host Apache Tomcat.
Create a Korn shell or a C shell script (dependent on the login-shell of your Apache Tomcat user name) to set the environment variables for Apache Tomcat. You must set the environment variables in a shell script and not in the user's profile.
With this mechanism you can install and run multiple Apache Tomcat versions and instances under one user name.
Example 1-1 Korn shell script to set the environment variables for Apache Tomcat 6.0.28
# more env.ksh #!/usr/bin/ksh # # Environment for Tomcat # JAVA_HOME=/usr/j2se export JAVA_HOME CATALINA_HOME=/global/mnt1/jakarta-tomcat-6.0.28 export CATALINA_HOME
Example 1-2 C shell script to set the environment variables for Apache Tomcat
# more env.csh #!/usr/bin/csh # # Environment for Tomcat # setenv JAVA_HOME /usr/j2se setenv CATALINA_HOME /global/mnt1/jakarta-tomcat-6.0.28
The environment variables are version and configuration dependent.
# clresourcetype register SUNW.HAStoragePlus SUNW.gds
# clresourcegroup create Apache Tomcat-resource-group
# clresource create -t SUNW.HAStoragePlus \ -p FileSystemMountPoints=Apache Tomcat-instance-mount-points \ Apache Tomcat-has-resource
# clreslogicalhostname create -g Apache Tomcat-resource-group \ -h logical-hostname Apache Tomcat-logical-hostname-resource-name
# clresourcegroup online -emM Apache Tomcat-resource-group
Install the zone according to the Oracle Solaris Cluster HA for Solaris Zones agent documentation, assuming that the resource name is Apache Tomcat-zone-rs and that the zone name is Apache Tomcat-zone.
# zoneadm -z Apache Tomcat-zone boot # zoneadm -z Apache Tomcat-zone halt
# cp /opt/SUNWsczone/sczbt/util/sczbt_config zones-target-configuration-file
RS=Apache Tomcat-zone-rs RG=Apache Tomcat-resource-group PARAMETERDIR=Apache Tomcat-zone-parameter-directory SC_NETWORK=true|false SC_LH=Apache Tomcat-logical-hostname-resource-name FAILOVER=true|false HAS_RS=Apache Tomcat-has-resource Zonename=Apache Tomcat-zone Zonebootopt=zone-boot-options Milestone=zone-boot-milestone Mounts=
# mkdir Apache Tomcat-zone-parameter-directory
# /opt/SUNWsczone/sczbt/util/sczbt_register -f zones-target-configuration-file
# clresource enable Apache Tomcat-zone-rs
# clresourcegroup online -emM Apache Tomcat-resource-group
Determine whether you will use Apache Tomcat as a failover or a multiple master, or a scalable data service.
For conceptual information on scalable and failover data services, see Oracle Solaris Cluster Concepts Guide.
Determine which user name will run Apache Tomcat.
Determine how many Apache Tomcat versions and instances will be deployed.
If more than one instance of a version will be deployed, determine whether they share the binaries.
Determine which Cluster File System will be used by each Apache Tomcat instance.
If Apache Tomcat is to run under a non root user, you have to create the appropriate user and the appropriate group. For these tasks use the following commands.
# su — user-name
If you deploy Apache Tomcat as a failover data service, install Apache Tomcat onto a shared file system or in a failover zone within Oracle Solaris Cluster.
It is recommended that you install Apache Tomcat onto shared disks. For a discussion of the advantages and disadvantages of installing the software on a local versus a cluster file system, see Determining the Location of the Application Binaries in Oracle Solaris Cluster Data Services Planning and Administration Guide.
If you plan to deploy Apache Tomcat as a failover data service, install the Apache Tomcat binaries on the shared storage on one node or in the failover zone. If Apache Tomcat will be deployed as a multiple master data service, install the Apache Tomcat binaries on the local storage in every target zone that will host the Apache Tomcat data service.
Note - Refer to http://tomcat.apache.org/index.html for instructions about installing Apache Tomcat.
If you deploy Apache Tomcat as a multiple masters data service, repeat the following step at every node or target zone that will host Apache Tomcat.
Create a Korn shell or a C shell script (dependent on the login-shell of your Apache Tomcat user name) to set the environment variables for Apache Tomcat. You must set the environment variables in a shell script and not in the user's profile.
With this mechanism you can install and run multiple Apache Tomcat versions and instances under one user name.
Example 1-3 Korn shell script to set the environment variables for Apache Tomcat 6.0.28
# more env.ksh #!/usr/bin/ksh # # Environment for Tomcat # JAVA_HOME=/usr/j2se export JAVA_HOME CATALINA_HOME=/global/mnt1/jakarta-tomcat-6.0.28 export CATALINA_HOME
Example 1-4 C shell script to set the environment variables for Apache Tomcat 6.0.28
# more env.csh #!/usr/bin/csh # # Environment for Tomcat # setenv JAVA_HOME /usr/j2se setenv CATALINA_HOME /global/mnt1/jakarta-tomcat-6.0.28
The environment variables are version and configuration dependent.