Sun Cluster Data Service for Apache Guide for Solaris OS

Example – Registering Failover Sun Cluster HA for Apache

The following example shows how to register a failover Apache service on a two-node cluster.

Cluster Information
Node names: phys-schost-1, phys-schost-2
Logical hostname: schost-1
Resource group: resource-group-1 (for all of the resources)
Resources: schost-1 (logical hostname),
	apache-1 (Apache application resource)
(Add a failover resource group to contain all of the resources.)
# scrgadm -a -g resource-group-1
(Add the logical hostname resource to the failover resource group.)
# scrgadm -a -L -g resource-group-1 -l schost-1 
(Register the Apache resource type.)
# scrgadm -a -t SUNW.apache
(Add Apache application resources to the failover resource group.)
# scrgadm -a -j apache-1 -g resource-group-1 \
-t SUNW.apache -y Network_resources_used=schost-1 \
-y Scalable=False -y Port_list=80/tcp \
-x Bin_dir=/opt/apache/bin
(Bring the failover resource group online.)
# scswitch -Z -g resource-group-1