Determine how Apache Tomcat will be deployed in Sun Cluster
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 Sun Cluster Concepts Guide for Solaris OS.
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.
Become superuser or assume a role that provides solaris.cluster.modify and solaris.cluster.admin RBAC authorizations.
(Optional) If you deploy Apache Tomcat in a non global zone, enter the target zone
# zlogin tomcat-zone
Create user and group if required.
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
Install Apache Tomcat.
If you deploy Apache Tomcat as a failover data service, install Apache Tomcat onto a shared file system or in a failover zone within Sun 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 Sun Cluster Data Services Planning and Administration Guide for Solaris OS.
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.
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 the environment script.
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.
These shell scripts must be available on every zone that can host the Apache Tomcat data service. For a failover configuration, store them on the shared storage of the node or in the target zone. For a multiple masters configuration, store them on the local file system or on the shared storage of the target zone. These scripts must not be different on the various zones. For an installation in afailover zone any place where the tomcat user has access is appropriate.
# 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
# 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
# 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
# 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.