HP-UX Secure Resource Partitions (SRP) A.02.01 Administrator's Guide

57
Creating compartment-specific initialization scripts and startup file to start Tomcat with the
compartment-specific configuration files when the compartment startup script is executed.
The setup script:
o Modifies the initialization scripts to start/stop tomcat application as the tomcat user.
Also, exported variables that define tomcat’s CATALINA_HOME, CATALINA_BASE
and JAVA_HOME directory.
o Creates the compartment-specific startup configuration file,
/var/hpsrp/compartment_name/etc/rc.config.d/hpws22_tomcatconf,
which specifies the compartment-specific tomcat home directory.
o Adds the startup and shutdown script hpws22_tomcat to the compartment-specific
init.d directory, /var/hpsrp/compartment_name/sbin/init.d. This file is
linked to the
/var/hpsrp/compartment_name/sbin/rc3.d/S823hpws22_tomcat and
/var/hpsrp/compartment_name/sbin/rc3.d/K177hpws22_tomcat files.
The
Completing the Configuration
After you apply the tomcat cmpt service and the default tomcat provisioning script, you can start
the SRP compartment, and have a fully-functional HP-UX Tomcat-based servlet Engine in the
compartment. You can further customize the servlet engine as needed by editing the compartment-
specific Tomcat configuration files
(/var/hpsrp/compartment_name/etc/rc.config.d/hpws22_tomcatconf and the
compartment-specific server.xml, located in the conf subdirectory below the data_path).
8.2 Replacing or Deleting Tomcat SRP Data
Use the following command to replace tomcat template data from an SRP compartment:
srp -r[eplace] compartment_name -t tomcat [-s service[,service]...]
The srp -replace command deletes the specified data, then prompts you for replacement data.
For example, the following command deletes all the IPFilter data for the tomcat template, then
prompts you for replacement data:
srp -replace mySRP -t tomcat -s ipfilter
Use the following command to delete tomcat template data from an SRP compartment:
srp -d[elete] compartment_name -t tomcat [-s service[,service]...]
CAUTION: If you do not specify the -template and/or -service arguments, srp deletes all
templates and/or services for the compartment. For example, the command srp -delete mySRP
deletes the entire mySRP SRP compartment.
For more information, see
13.2 Deleting Configuration Data and 13.3 Replacing Configuration Data.