Installing and Configuring Sun Cluster HA for Apache Tomcat
Installing and Configuring Solaris Cluster HA for Apache Tomcat
Solaris Cluster HA for Apache Tomcat
Planning the Solaris Cluster HA for Apache Tomcat Installation and Configuration
Apache Tomcat and Solaris Containers
Solaris Cluster HA for Apache Tomcat as a scalable configuration
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 Containers
Restriction for the Apache Tomcat smf Service Name in a Failover Zone
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
Apache Tomcat Component Dependencies
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 a Zone Configuration
How to Install and Configure Apache Tomcat in a 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 Packages
How to Install the HA for Apache Tomcat Packages
Registering and Configuring Solaris Cluster HA for Apache Tomcat
How to Register and Configure Solaris Cluster HA for Apache Tomcat as a Failover Data Service
How to Register and Configure Solaris Cluster HA for Apache Tomcat as a Scalable Data Service
Configuring Oracle Solaris Cluster HA for Apache Tomcat in Zones
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 a Oracle Solaris Cluster HA for Apache Tomcat Resource From a Failover Zone
Configuring Oracle Solaris Cluster HA for Apache Tomcat in a Zone
How to Register Oracle Solaris Cluster HA for Apache Tomcat in a Zone
Verifying the Solaris Cluster HA for Apache Tomcat Installation and Configuration
How to Verify the Solaris Cluster HA for Apache Tomcat Installation and Configuration
Understanding the Solaris Cluster Apache Tomcat HA Parameter File
Structure of the Apache Tomcat HA parameter file
Strategy to Chose the TestCmd and the ReturnString Variable
Understanding 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
C. Deployment Example: Installing Apache Tomcat in a Non-Global Zone
This section contains the procedures you need to install and configure Apache Tomcat.
Determine how Apache Tomcat will be deployed in Solaris Cluster –
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 are, the global zone, the failover zone, or a 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 zone configuration, complete the following tasks:
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:
Deployment Example: Installing Apache Tomcat in the Global Zone
Deployment Example: Installing Apache Tomcat in a Failover Zone
Deployment Example: Installing Apache Tomcat in a Non-Global 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 -M -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 -M 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 -M 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 -M Apache Tomcat-resource-group
Determine whether you will use Apache Tomcat as a failover 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 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 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 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://jakarta.apache.org/tomcat/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 an 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 users profile.
With this mechanism you can install and run multiple Apache Tomcat versions and instances under one user name.
Example 1 Korn shell script to set the environment variables for Apache Tomcat 3.x/3.3
# more env.ksh #!/usr/bin/ksh # # Environment for Tomcat # JAVA_HOME=/usr/j2se export JAVA_HOME JAKARTA_HOME=/global/mnt1/jakarta-3.3 export JAKARTA_HOME TOMCAT_HOME=$JAKARTA_HOME export TOMCAT_HOME
Example 2 C shell script to set the environment variables for Apache Tomcat 3.3/3.3
# more env.csh #!/usr/bin/csh # # Environment for Tomcat # setenv JAVA_HOME /usr/j2se setenv JAKARTA_HOME /global/mnt1/jakarta-3.3 setenv TOMCAT_HOME $JAKARTA_HOME
Example 3 Korn shell script to set the environment variables for Apache Tomcat 4.1.x
# more env.ksh #!/usr/bin/ksh # # Environment for Tomcat # JAVA_HOME=/usr/j2se export JAVA_HOME CATALINA_HOME=/global/mnt1/jakarta-tomcat-4.1.18 export CATALINA_HOME
Example 4 C shell script to set the environment variables for Apache Tomcat 4.1.x
# more env.csh #!/usr/bin/csh # # Environment for Tomcat # setenv JAVA_HOME /usr/j2se setenv CATALINA_HOME /global/mnt1/jakarta-tomcat-4.1.18
The environment variables are version and configuration dependent.
# clresourcetype register SUNW.gds SUNW.HAStoragePlus
Note - Perform this step only if you create a failover data service.
# clresourcegroup create -n node1:Apache Tomcat-zone,node2:Apache Tomcat-zone \ 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 -M -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 \ > -n node1:Apache Tomcat-zone,node2:Apache Tomcat-zone\ > 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 -M Apache Tomcat-failover-resource-group
Note - Perform this step only if you create a scalable data service.
# clresourcegroup create -n node1:Apache Tomcat-zone,node2:Apache Tomcat-zone\ > 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 -M 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 \ -n node1:Apache Tomcat-zone,node2:Apache Tomcat-zone\ 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 -M Apache Tomcatscalable-resource-group
Determine whether you will use Apache Tomcat as a failover 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.
# zlogin tomcat-zone
Caution - In this scenario, the deployment of Tomcat applications needs to occur on every zone 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 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 will deploy Apache Tomcat as a failover data service install the Apache Tomcat binaries on the shared storage on one zone. If Apache Tomcat will be deployed as a scalable or 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://jakarta.apache.org/tomcat/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 target zone that will host Apache Tomcat.
Create an 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 users profile.
With this mechanism you can install and run multiple Apache Tomcat versions and instances under one user name.
Example 5 Korn shell script to set the environment variables for Apache Tomcat 3.x/3.3
# more env.ksh #!/usr/bin/ksh # # Environment for Tomcat # JAVA_HOME=/usr/j2se export JAVA_HOME JAKARTA_HOME=/global/mnt1/jakarta-3.3 export JAKARTA_HOME TOMCAT_HOME=$JAKARTA_HOME export TOMCAT_HOME
Example 6 C shell script to set the environment variables for Apache Tomcat 3.3/3.3
# more env.csh #!/usr/bin/csh # # Environment for Tomcat # setenv JAVA_HOME /usr/j2se setenv JAKARTA_HOME /global/mnt1/jakarta-3.3 setenv TOMCAT_HOME $JAKARTA_HOME
Example 7 Korn shell script to set the environment variables for Apache Tomcat 4.1.x
# more env.ksh #!/usr/bin/ksh # # Environment for Tomcat # JAVA_HOME=/usr/j2se export JAVA_HOME CATALINA_HOME=/global/mnt1/jakarta-tomcat-4.1.18 export CATALINA_HOME
Example 8 C shell script to set the environment variables for Apache Tomcat 4.1.x
# more env.csh #!/usr/bin/csh # # Environment for Tomcat # setenv JAVA_HOME /usr/j2se setenv CATALINA_HOME /global/mnt1/jakarta-tomcat-4.1.18
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 -M Apache Tomcat-resource-group
Install the zone according to the Oracle Solaris Cluster HA for Solaris Containers 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 Apache Tomcat-resource-group
Determine whether you will use Apache Tomcat as a failover 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.
# zlogin tomcat-zone
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 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 will 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://jakarta.apache.org/tomcat/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 an 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 users profile.
With this mechanism you can install and run multiple Apache Tomcat versions and instances under one user name.
Example 9 Korn shell script to set the environment variables for Apache Tomcat 3.x/3.3
# more env.ksh #!/usr/bin/ksh # # Environment for Tomcat # JAVA_HOME=/usr/j2se export JAVA_HOME JAKARTA_HOME=/global/mnt1/jakarta-3.3 export JAKARTA_HOME TOMCAT_HOME=$JAKARTA_HOME export TOMCAT_HOME
Example 10 C shell script to set the environment variables for Apache Tomcat 3.3/3.3
# more env.csh #!/usr/bin/csh # # Environment for Tomcat # setenv JAVA_HOME /usr/j2se setenv JAKARTA_HOME /global/mnt1/jakarta-3.3 setenv TOMCAT_HOME $JAKARTA_HOME
Example 11 Korn shell script to set the environment variables for Apache Tomcat 4.1.x
# more env.ksh #!/usr/bin/ksh # # Environment for Tomcat # JAVA_HOME=/usr/j2se export JAVA_HOME CATALINA_HOME=/global/mnt1/jakarta-tomcat-4.1.18 export CATALINA_HOME
Example 12 C shell script to set the environment variables for Apache Tomcat 4.1.x
# more env.csh #!/usr/bin/csh # # Environment for Tomcat # setenv JAVA_HOME /usr/j2se setenv CATALINA_HOME /global/mnt1/jakarta-tomcat-4.1.18
The environment variables are version and configuration dependent.