removeapachetomcat

apachetomcat  时间:2021-01-11  阅读:()
OracleSolarisClusterDataServiceforApacheTomcatGuidePartNo:E26824March2012,E26824–01Copyright2010,2012,Oracleand/oritsaffiliates.
Allrightsreserved.
Thissoftwareandrelateddocumentationareprovidedunderalicenseagreementcontainingrestrictionsonuseanddisclosureandareprotectedbyintellectualpropertylaws.
Exceptasexpresslypermittedinyourlicenseagreementorallowedbylaw,youmaynotuse,copy,reproduce,translate,broadcast,modify,license,transmit,distribute,exhibit,perform,publishordisplayanypart,inanyform,orbyanymeans.
Reverseengineering,disassembly,ordecompilationofthissoftware,unlessrequiredbylawforinteroperability,isprohibited.
Theinformationcontainedhereinissubjecttochangewithoutnoticeandisnotwarrantedtobeerror-free.
Ifyoufindanyerrors,pleasereportthemtousinwriting.
IfthisissoftwareorrelateddocumentationthatisdeliveredtotheU.
S.
GovernmentoranyonelicensingitonbehalfoftheU.
S.
Government,thefollowingnoticeisapplicable:U.
S.
GOVERNMENTRIGHTS.
Programs,software,databases,andrelateddocumentationandtechnicaldatadeliveredtoU.
S.
Governmentcustomersare"commercialcomputersoftware"or"commercialtechnicaldata"pursuanttotheapplicableFederalAcquisitionRegulationandagency-specificsupplementalregulations.
Assuch,theuse,duplication,disclosure,modification,andadaptationshallbesubjecttotherestrictionsandlicensetermssetforthintheapplicableGovernmentcontract,and,totheextentapplicablebythetermsoftheGovernmentcontract,theadditionalrightssetforthinFAR52.
227-19,CommercialComputerSoftwareLicense(December2007).
OracleAmerica,Inc.
,500OracleParkway,RedwoodCity,CA94065.
Thissoftwareorhardwareisdevelopedforgeneraluseinavarietyofinformationmanagementapplications.
Itisnotdevelopedorintendedforuseinanyinherentlydangerousapplications,includingapplicationsthatmaycreateariskofpersonalinjury.
Ifyouusethissoftwareorhardwareindangerousapplications,thenyoushallberesponsibletotakeallappropriatefail-safe,backup,redundancy,andothermeasurestoensureitssafeuse.
OracleCorporationanditsaffiliatesdisclaimanyliabilityforanydamagescausedbyuseofthissoftwareorhardwareindangerousapplications.
OracleandJavaareregisteredtrademarksofOracleand/oritsaffiliates.
Othernamesmaybetrademarksoftheirrespectiveowners.
IntelandIntelXeonaretrademarksorregisteredtrademarksofIntelCorporation.
AllSPARCtrademarksareusedunderlicenseandaretrademarksorregisteredtrademarksofSPARCInternational,Inc.
AMD,Opteron,theAMDlogo,andtheAMDOpteronlogoaretrademarksorregisteredtrademarksofAdvancedMicroDevices.
UNIXisaregisteredtrademarkofTheOpenGroup.
Thissoftwareorhardwareanddocumentationmayprovideaccesstoorinformationoncontent,products,andservicesfromthirdparties.
OracleCorporationanditsaffiliatesarenotresponsibleforandexpresslydisclaimallwarrantiesofanykindwithrespecttothird-partycontent,products,andservices.
OracleCorporationanditsaffiliateswillnotberesponsibleforanyloss,costs,ordamagesincurredduetoyouraccesstooruseofthird-partycontent,products,orservices.
Celogicieletladocumentationquil'accompagnesontprotégésparlesloissurlapropriétéintellectuelle.
Ilssontconcédéssouslicenceetsoumisàdesrestrictionsd'utilisationetdedivulgation.
Saufdispositiondevotrecontratdelicenceoudelaloi,vousnepouvezpascopier,reproduire,traduire,diffuser,modifier,breveter,transmettre,distribuer,exposer,exécuter,publierouafficherlelogiciel,mêmepartiellement,sousquelqueformeetparquelqueprocédéquecesoit.
Parailleurs,ilestinterditdeprocéderàtouteingénierieinversedulogiciel,deledésassembleroudeledécompiler,exceptéàdesfinsd'interopérabilitéavecdeslogicielstiersoutelqueprescritparlaloi.
Lesinformationsfourniesdanscedocumentsontsusceptiblesdemodificationsanspréavis.
Parailleurs,OracleCorporationnegarantitpasqu'ellessoientexemptesd'erreursetvousinvite,lecaséchéant,àluienfairepartparécrit.
Sicelogiciel,ouladocumentationquil'accompagne,estconcédésouslicenceauGouvernementdesEtats-Unis,ouàtouteentitéquidélivrelalicencedecelogicieloul'utilisepourlecompteduGouvernementdesEtats-Unis,lanoticesuivantes'applique:U.
S.
GOVERNMENTRIGHTS.
Programs,software,databases,andrelateddocumentationandtechnicaldatadeliveredtoU.
S.
Governmentcustomersare"commercialcomputersoftware"or"commercialtechnicaldata"pursuanttotheapplicableFederalAcquisitionRegulationandagency-specificsupplementalregulations.
Assuch,theuse,duplication,disclosure,modification,andadaptationshallbesubjecttotherestrictionsandlicensetermssetforthintheapplicableGovernmentcontract,and,totheextentapplicablebythetermsoftheGovernmentcontract,theadditionalrightssetforthinFAR52.
227-19,CommercialComputerSoftwareLicense(December2007).
OracleAmerica,Inc.
,500OracleParkway,RedwoodCity,CA94065.
Celogicieloumatérielaétédéveloppépourunusagegénéraldanslecadred'applicationsdegestiondesinformations.
Celogicieloumatérieln'estpasconunin'estdestinéàêtreutilisédansdesapplicationsàrisque,notammentdansdesapplicationspouvantcauserdesdommagescorporels.
Sivousutilisezcelogicieloumatérieldanslecadred'applicationsdangereuses,ilestdevotreresponsabilitédeprendretouteslesmesuresdesecours,desauvegarde,deredondanceetautresmesuresnécessairesàsonutilisationdansdesconditionsoptimalesdesécurité.
OracleCorporationetsesaffiliésdéclinenttouteresponsabilitéquantauxdommagescausésparl'utilisationdecelogicieloumatérielpourcetyped'applications.
OracleetJavasontdesmarquesdéposéesd'OracleCorporationet/oudesesaffiliés.
Toutautrenommentionnépeutcorrespondreàdesmarquesappartenantàd'autrespropriétairesqu'Oracle.
InteletIntelXeonsontdesmarquesoudesmarquesdéposéesd'IntelCorporation.
TouteslesmarquesSPARCsontutiliséessouslicenceetsontdesmarquesoudesmarquesdéposéesdeSPARCInternational,Inc.
AMD,Opteron,lelogoAMDetlelogoAMDOpteronsontdesmarquesoudesmarquesdéposéesd'AdvancedMicroDevices.
UNIXestunemarquedéposéed'TheOpenGroup.
Celogicieloumatérieletladocumentationquil'accompagnepeuventfournirdesinformationsoudesliensdonnantaccèsàdescontenus,desproduitsetdesservicesémanantdetiers.
OracleCorporationetsesaffiliésdéclinenttouteresponsabilitéougarantieexpressequantauxcontenus,produitsouservicesémanantdetiers.
Enaucuncas,OracleCorporationetsesaffiliésnesauraientêtretenuspourresponsablesdespertessubies,descotsoccasionnésoudesdommagescausésparl'accèsàdescontenus,produitsouservicestiers,ouàleurutilisation.
120306@25097ContentsPreface71InstallingandConfiguringOracleSolarisClusterHAforApacheTomcat11InstallingandConfiguringOracleSolarisClusterHAforApacheTomcat11OracleSolarisClusterHAforApacheTomcat12PlanningtheOracleSolarisClusterHAforApacheTomcatInstallationandConfiguration.
.
.
13ApacheTomcatandSolarisZones13AboutHorizontalScalability13ConfigurationRestrictions15ConfigurationRequirements16InstallingandConfiguringApacheTomcat20HowtoEnableApacheTomcattoruninaGlobalZoneConfiguration21HowtoInstallandConfigureApacheTomcatintheGlobalZone24HowtoEnableApacheTomcattoruninFailoverZoneConfiguration26HowtoInstallandConfigureApacheTomcatinaFailoverZone27VerifyingtheInstallationandConfigurationofApacheTomcat29HowtoVerifytheInstallationandConfigurationofApacheTomcat29HowtoDeploytheApacheTomcatApplication30InstallingtheHAforApacheTomcatPackage31HowtoInstalltheHAforApacheTomcatPackage31RegisteringandConfiguringOracleSolarisClusterHAforApacheTomcat32HowtoRegisterandConfigureOracleSolarisClusterHAforApacheTomcatasaFailoverDataService32HowtoRegisterandConfigureOracleSolarisClusterHAforApacheTomcatasaMultipleMastersDataService35HowtoRegisterandConfigureOracleSolarisClusterHAforApacheTomcatasaScalableDataService39ConfiguringOracleSolarisClusterHAforApacheTomcatinaFailoverZone433ConfiguringOracleSolarisClusterHAforApacheTomcatinaFailoverZone43VerifyingtheOracleSolarisClusterHAforApacheTomcatInstallationandConfiguration.
.
45HowtoVerifytheOracleSolarisClusterHAforApacheTomcatInstallationandConfiguration46UnderstandingtheOracleSolarisClusterApacheTomcatHAParameterFile46StructureoftheApacheTomcatHAparameterfile46StrategytoChoosetheTestCmdandtheReturnStringVariable48UnderstandingOracleSolarisClusterHAforApacheTomcatFaultMonitor48ResourceProperties49ProbingAlgorithmandFunctionality49DebuggingHAforApacheTomcat49HowtoActivateDebuggingforHAforApacheTomcat49ADeploymentExample:InstallingApacheTomcatintheGlobalZone51TargetClusterConfiguration51SoftwareConfiguration51Assumptions52InstallingandConfiguringApacheTomcatonGlobalStorageintheGlobalZone52Example:PreparingtheClusterforApacheTomcat52Example:ConfiguringClusterResourcesforApacheTomcat53Example:InstallingtheApacheTomcatSoftwareonSharedStorage53Example:ModifyingtheApacheTomcatConfigurationFiles54Example:EnablingtheApacheTomcatSoftwaretoRunintheCluster55BDeploymentExample:InstallingApacheTomcatinaFailoverZone57TargetClusterConfiguration57SoftwareConfiguration57Assumptions58InstallingandConfiguringApacheTomcatonGlobalStorageintheFailoverZone58Example:PreparingtheClusterforApacheTomcat58Example:ConfiguringClusterResourcesforApacheTomcat58Example:CreatingandConfiguringtheFailoverZone59Example:InstallingtheApacheTomcatSoftwareonSharedStorage63Example:ModifyingtheApacheTomcatConfigurationFiles64EnablingtheApacheTomcatSoftwaretoRunintheCluster65ContentsOracleSolarisClusterDataServiceforApacheTomcatGuideMarch2012,E26824–014Index67Contents56PrefaceOracleSolarisClusterDataServiceforApacheTomcatGuideexplainshowtoinstallandconfigureOracleSolarisClusterdataservices.
Note–ThisOracleSolarisClusterreleasesupportssystemsthatusetheSPARCandx86familiesofprocessorarchitectures.
Inthisdocument,"x86"referstothelargerfamilyofx86compatibleproducts.
Informationinthisdocumentpertainstoallplatformsunlessotherwisespecified.
ThisdocumentisintendedforsystemadministratorswithextensiveknowledgeofOraclesoftwareandhardware.
Donotusethisdocumentasaplanningorpresalesguide.
Beforereadingthisdocument,youshouldhavealreadydeterminedyoursystemrequirementsandpurchasedtheappropriateequipmentandsoftware.
TheinstructionsinthisbookassumeknowledgeoftheOracleSolarisOperatingSystemandexpertisewiththevolume-managersoftwarethatisusedwithOracleSolarisClustersoftware.
BashisthedefaultshellforOracleSolaris11.
MachinenamesshownwiththeBashshellpromptaredisplayedforclarity.
UsingUNIXCommandsThisdocumentcontainsinformationaboutcommandsthatarespecifictoinstallingandconfiguringOracleSolarisClusterdataservices.
ThedocumentdoesnotcontaincomprehensiveinformationaboutbasicUNIXcommandsandprocedures,suchasshuttingdownthesystem,bootingthesystem,andconfiguringdevices.
InformationaboutbasicUNIXcommandsandproceduresisavailablefromthefollowingsources:OnlinedocumentationfortheOracleSolarisOperatingSystemOracleSolarisOperatingSystemmanpagesOthersoftwaredocumentationthatyoureceivedwithyoursystem7TypographicConventionsThefollowingtabledescribesthetypographicconventionsthatareusedinthisbook.
TABLEP–1TypographicConventionsTypefaceDescriptionExampleAaBbCc123Thenamesofcommands,files,anddirectories,andonscreencomputeroutputEdityour.
loginfile.
Usels-atolistallfiles.
machine_name%youhavemail.
AaBbCc123Whatyoutype,contrastedwithonscreencomputeroutputmachine_name%suPassword:aabbcc123Placeholder:replacewitharealnameorvalueThecommandtoremoveafileisrmfilename.
AaBbCc123Booktitles,newterms,andtermstobeemphasizedReadChapter6intheUser'sGuide.
Acacheisacopythatisstoredlocally.
Donotsavethefile.
Note:Someemphasizeditemsappearboldonline.
ShellPromptsinCommandExamplesThefollowingtableshowsthedefaultUNIXsystempromptandsuperuserpromptforshellsthatareincludedintheOracleSolarisOS.
Notethatthedefaultsystempromptthatisdisplayedincommandexamplesvaries,dependingontheOracleSolarisrelease.
TABLEP–2ShellPromptsShellPromptBashshell,Kornshell,andBourneshell$Bashshell,Kornshell,andBourneshellforsuperuser#Cshellmachine_name%Cshellforsuperusermachine_name#PrefaceOracleSolarisClusterDataServiceforApacheTomcatGuideMarch2012,E26824–018RelatedDocumentationInformationaboutrelatedOracleSolarisClustertopicsisavailableinthedocumentationthatislistedinthefollowingtable.
AllOracleSolarisClusterdocumentationisavailableathttp://www.
oracle.
com/technetwork/indexes/documentation/index.
html.
TopicDocumentationHardwareinstallationandadministrationOracleSolarisCluster4.
0HardwareAdministrationManualIndividualhardwareadministrationguidesConceptsOracleSolarisClusterConceptsGuideSoftwareinstallationOracleSolarisClusterSoftwareInstallationGuideDataserviceinstallationandadministrationOracleSolarisClusterDataServicesPlanningandAdministrationGuideandindividualdataserviceguidesDataservicedevelopmentOracleSolarisClusterDataServicesDeveloper'sGuideSystemadministrationOracleSolarisClusterSystemAdministrationGuideOracleSolarisClusterQuickReferenceSoftwareupgradeOracleSolarisClusterUpgradeGuideErrormessagesOracleSolarisClusterErrorMessagesGuideCommandandfunctionreferencesOracleSolarisClusterReferenceManualOracleSolarisClusterDataServicesReferenceManualOracleSolarisClusterGeographicEditionReferenceManualOracleSolarisClusterQuorumServerReferenceManualAccesstoOracleSupportOraclecustomershaveaccesstoelectronicsupportthroughMyOracleSupport.
Forinformation,visithttp://www.
oracle.
com/pls/topic/lookupctx=acc&id=infoorvisithttp://www.
oracle.
com/pls/topic/lookupctx=acc&id=trsifyouarehearingimpaired.
Preface9GettingHelpIfyouhaveproblemsinstallingorusingOracleSolarisCluster,contactyourserviceproviderandprovidethefollowinginformation.
Yournameandemailaddress(ifavailable)Yourcompanyname,address,andphonenumberThemodelnumberandserialnumberofyoursystemsThereleasenumberoftheoperatingenvironment(forexample,OracleSolaris11)ThereleasenumberofOracleSolarisCluster(forexample,OracleSolarisCluster4.
0)Usethefollowingcommandstogatherinformationaboutyoursystemforyourserviceprovider.
CommandFunctionprtconf-vDisplaysthesizeofthesystemmemoryandreportsinformationaboutperipheraldevicespsrinfo-vDisplaysinformationaboutprocessorspkglistReportswhichpackagesareinstalledprtdiag-vDisplayssystemdiagnosticinformation/usr/cluster/bin/clnodeshow-revDisplaysOracleSolarisClusterreleaseandpackageversioninformationforeachnodeAlsohaveavailablethecontentsofthe/var/adm/messagesfile.
PrefaceOracleSolarisClusterDataServiceforApacheTomcatGuideMarch2012,E26824–0110InstallingandConfiguringOracleSolarisClusterHAforApacheTomcatThischapterexplainshowtoinstallandconfigureHAforApacheTomcat.
Thischaptercontainsthefollowingsections.
"InstallingandConfiguringOracleSolarisClusterHAforApacheTomcat"onpage11"OracleSolarisClusterHAforApacheTomcat"onpage12"PlanningtheOracleSolarisClusterHAforApacheTomcatInstallationandConfiguration"onpage13"InstallingandConfiguringApacheTomcat"onpage20"VerifyingtheInstallationandConfigurationofApacheTomcat"onpage29"InstallingtheHAforApacheTomcatPackage"onpage31"RegisteringandConfiguringOracleSolarisClusterHAforApacheTomcat"onpage32"ConfiguringOracleSolarisClusterHAforApacheTomcatinaFailoverZone"onpage43"VerifyingtheOracleSolarisClusterHAforApacheTomcatInstallationandConfiguration"onpage45"UnderstandingtheOracleSolarisClusterApacheTomcatHAParameterFile"onpage46"UnderstandingOracleSolarisClusterHAforApacheTomcatFaultMonitor"onpage48"DebuggingHAforApacheTomcat"onpage49InstallingandConfiguringOracleSolarisClusterHAforApacheTomcatTable1–1liststhetasksforinstallingandconfiguringOracleSolarisClusterHAforApacheTomcat.
Performthesetasksintheordertheyarelisted.
TABLE1–1TaskMap:InstallingandConfiguringOracleSolarisClusterHAforApacheTomcatTaskForInstructions,GoTo1.
Plantheinstallation.
"PlanningtheOracleSolarisClusterHAforApacheTomcatInstallationandConfiguration"onpage131CHAPTER111TABLE1–1TaskMap:InstallingandConfiguringOracleSolarisClusterHAforApacheTomcat(Continued)TaskForInstructions,GoTo2.
InstallandconfigureApacheTomcat.
"HowtoInstallandConfigureApacheTomcatintheGlobalZone"onpage243.
Verifyinstallationandconfiguration.
"HowtoVerifytheInstallationandConfigurationofApacheTomcat"onpage294.
InstallOracleSolarisClusterHAforApacheTomcatpackages.
"InstallingtheHAforApacheTomcatPackage"onpage315.
1RegisterandConfigureOracleSolarisClusterHAforApacheTomcatasafailoverdataservice.
"HowtoRegisterandConfigureOracleSolarisClusterHAforApacheTomcatasaFailoverDataService"onpage325.
2RegisterandConfigureOracleSolarisClusterHAforApacheTomcatasamultiplemastersdataservice.
"HowtoRegisterandConfigureOracleSolarisClusterHAforApacheTomcatasaMultipleMastersDataService"onpage355.
3RegisterandConfigureOracleSolarisClusterHAforApacheTomcatasascalabledataservice.
"HowtoRegisterandConfigureOracleSolarisClusterHAforApacheTomcatasaScalableDataService"onpage395.
4RegisterandconfigureOracleSolarisClusterHAforApacheTomcatinafailoverzone.
"ConfiguringOracleSolarisClusterHAforApacheTomcatinaFailoverZone"onpage436.
VerifyOracleSolarisClusterHAforApacheTomcatInstallationandConfiguration.
"HowtoVerifytheOracleSolarisClusterHAforApacheTomcatInstallationandConfiguration"onpage467.
UnderstandingtheOracleSolarisClusterApacheTomcatHAparameterfile.
"UnderstandingtheOracleSolarisClusterApacheTomcatHAParameterFile"onpage468.
UnderstandingtheOracleSolarisClusterHAforApacheTomcatFaultMonitor.
"UnderstandingOracleSolarisClusterHAforApacheTomcatFaultMonitor"onpage489.
HowtodebugOracleSolarisClusterHAforApacheTomcat.
"HowtoActivateDebuggingforHAforApacheTomcat"onpage49OracleSolarisClusterHAforApacheTomcatApacheTomcatactsasaservletenginebehindanApachewebserver,oryoucanconfigureitasastandalonewebserverthatincludestheservletengine.
ApacheTomcatisfreelyavailableunderApacheSoftwareLicenseandcanbedownloadedfromhttp://jakarta.
apache.
org.
OracleSolarisClusterHAforApacheTomcatOracleSolarisClusterDataServiceforApacheTomcatGuideMarch2012,E26824–0112TheOracleSolarisClusterHAforApacheTomcatdataserviceprovidesamechanismfororderlystartupandshutdown,faultmonitoring,andautomaticfailoveroftheApacheTomcatservice.
ThefollowingtabledescribestherelationbetweentheapplicationcomponentsandtherelatedOracleSolarisClusterdataservice.
TABLE1–2ProtectionofComponentsComponentProtectedbyApacheTomcatOracleSolarisClusterHAforApacheTomcatFailoverZoneOracleSolarisClusterHAforZonesPlanningtheOracleSolarisClusterHAforApacheTomcatInstallationandConfigurationThissectioncontainstheinformationyouneedtoplanyourOracleSolarisClusterHAforApacheTomcatinstallationandconfiguration.
Note–OracleSolarisClusterHAforApacheTomcatissupportedonazonecluster,andthezoneclusternodeistreatedlikeaphysicalnode.
ApacheTomcatandSolarisZonesOracleSolarisClusterHAforApacheTomcatissupportedinSolarisZones,andOracleSolarisClustersupportstwoconceptsforSolarisZones.
Zonesarecontainersthatarerunningafterarebootofthenode.
Thesecontainers,combinedwithresourcegroupshavingthenodenamenodename:zonenameasavalid"nodename"intheresourcegroupsnodenamelist.
FailoverZonecontainersaremanagedbytheSolarisZonesagent,andarerepresentedbyaresourceofaresourcegroup.
AboutHorizontalScalabilityOracleSolarisClusterincludesaconceptofhorizontalscalabilityfordataservicescalledscalableservice.
IPbasedload-balancingalgorithmsareintegratedinthisconcept.
Becauseofthisreasonyoucanscalehorizontallywithoutusinghardwareloadbalancers.
Foramoredetaileddiscussionofthisscalableservice,seeOracleSolarisClusterConceptsGuide.
PlanningtheOracleSolarisClusterHAforApacheTomcatInstallationandConfigurationChapter1InstallingandConfiguringOracleSolarisClusterHAforApacheTomcat13BeforeusingtheOracleSolarisClusterHAforApacheTomcatinascalableconfiguration,youshouldcloselyexaminetheinfrastructureoftheclusterandtheclients.
Ifyourclientsaccessyourapplicationusingproxies,determinewhethertheusedproxystaysthesameduringasessioncontext.
Thisistrueforanintranet.
Iftheproxychangesduringasessioncontext,thissignifiesthatfromtheload-balancingpointofviewthatthesourceIPaddressischanging.
ThiswillspoileveryIPbasedload-balancingeffort,whetheritishardwareorsoftware.
WhentheclientaccessestheserverovertheInternet,itisnotguaranteedthatthesourceIPaddressremainsthesameduringasessioncontext.
OracleSolarisClusterHAforApacheTomcatcanbeconfiguredtwowaystogethorizontalscalability:1.
UsingOracleSolarisClusterHAforApacheTomcatinapurelyscalableconfiguration.
2.
UsingOracleSolarisClusterHAforApacheTomcatinamultiple-mastersconfiguration.
Thedifferencebetweenthetwoconfigurationisinthewayofaccessingthenodes:Aclientaccessesthescalableconfigurationbyitssharedaddress.
Inthiscase,OracleSolarisClusterdoestheload-balancing.
Aclientaccessesamultiplemastersconfigurationusingeachnode'sphysicaladdress.
Load-balancingmustbedoneoutsideofthecluster.
Formoreinformationaboutscalabledataservices,seeOracleSolarisClusterConceptsGuide.
Bothconfigurationoptionsarediscussedinthesections"OracleSolarisClusterHAforApacheTomcatasascalableconfiguration"onpage14and"OracleSolarisClusterHAforApacheTomcatasamultiplemasterconfiguration"onpage15.
OracleSolarisClusterHAforApacheTomcatasascalableconfigurationYoucanuseOracleSolarisClusterHAforApacheTomcatinascalableconfigurationifitisguaranteed,thatthesourceIPaddressremainsthesameduringasessioncontext.
Thisguaranteeisachievedinexampleinanintranet.
IfthesourceIPaddressmightchangeduringasessioncontextandascalableconfigurationisrequired,ApacheTomcatneedstobeconfiguredwithsessionreplication.
Thiscanbedonebytheapplicationusingaglobalfilesystemoradatabase.
Caution–Youwillgetaperformancepenaltyfromthisapproach.
YouwillgetbetterperformanceusingTomcat'sinboundmemorysessionreplicationforascalableconfigurationwithchangingsourceIPaddresses.
PlanningtheOracleSolarisClusterHAforApacheTomcatInstallationandConfigurationOracleSolarisClusterDataServiceforApacheTomcatGuideMarch2012,E26824–0114ForApacheTomcat5.
xand6.
x,inboundmemorysessionreplicationasabuilt-infeatureisonthefeaturelist.
OracleSolarisClusterHAforApacheTomcatasamultiplemasterconfigurationYoucanuseOracleSolarisClusterHAforApacheTomcatinamultiplemasterconfigurationintheotherscenarios.
Externalload-balancingisrequired.
AtypicalconfigurationusesthescalableApachewebserverasaloadbalancerandconfiguresonephysicalhostnameofanApacheTomcatinstancebehindeachinstanceoftheApachewebserver.
Anotheroptionistouseahardwareloadbalancer,whichhandlesthesessioncontext.
Thedifferencebetweenscalableandmultiplemastersconfigurationisinthewaytheclientsaccesstheclusternodes.
Inascalableconfiguration,theyaccessthesharedaddress.
Otherwise,theclientsaccessthephysicalzoneorhostnames.
ConfigurationRestrictionsTheconfigurationrequirementsinthissectionapplyonlytoApacheTomcat.
Caution–Ifyourdataserviceconfigurationdoesnotconformtotheserequirements,thedataserviceconfigurationmightnotbesupported.
RestrictiontodeployOracleSolarisClusterHAforApacheTomcatinascalableconfigurationDeployascalableOracleSolarisClusterHAforApacheTomcatconfigurationonlyifeithersessionreplicationorreliablesourceIPaddressesareachieved.
Otherwise,thebehavioroftheapplicationbecomesunpredictable.
RestrictionfortheLoad_balancing_policySettingtheresourceparameterLoad_balancing_policytoLB_STICKYisstrictlyrequired,ifOracleSolarisClusterHAforApacheTomcatisdeployedinascalableconfigurationwithreliablesourceIPaddresseswhennosessionreplicationisconfigured.
Otherwise,thebehavioroftheapplicationbecomesunpredictable.
Ineveryotherscalableconfiguration,theStickyLoad_balancing_policyhelpstogetmorecachehitsoutofyourcaches.
RestrictionforScalableServicesandSolarisZonesOracleSolarisClusterHAforApacheTomcatcanbedeployedinscalableconfigurationsinSolarisZonesonlyifyouusethezonefeaturesofOracleSolarisCluster.
PlanningtheOracleSolarisClusterHAforApacheTomcatInstallationandConfigurationChapter1InstallingandConfiguringOracleSolarisClusterHAforApacheTomcat15RestrictionfortheApacheTomcatsmfServiceNameinaFailoverZoneTheApacheTomcatconfigurationinafailoverzoneusesthesmfcomponentofOracleSolarisClusterHAforSolarisZones.
TheregistrationoftheApacheTomcatdataserviceinafailoverzonedefinesansmfservicetocontroltheApacheTomcatdatabase.
Thenameofthissmfserviceisgeneratedinthisnamingscheme:svc:/application/sczone-agents:resource-name.
Noothersmfservicewithexactlythisnamecanexist.
Theassociatedsmfmanifestisautomaticallycreatedduringtheregistrationprocessinthislocationandnamingscheme:/var/svc/manifest/application/sczone-agents/resource-name.
xml.
Noothermanifestcancoexistwiththisname.
RestrictionforApacheTomcat5.
5.
28,6.
0.
28,6.
0.
29,and7.
06StartingwithApacheTomcatversions5.
5.
28,6.
0.
28,6.
0.
29,and7.
06,youmustusethewgetprobealgorithm.
Thisbypassesthenormalprobe,enablingtheTestUrlparametertoworkcorrectly.
YoucanchoosetousethewgetprobealgorithmforearlierApacheTomcatversionsorcontinuetousetheoriginalmconnectprobealgorithm.
ConfigurationRequirementsTheserequirementsapplytoOracleSolarisClusterHAforApacheTomcatonly.
YoumustmeettheserequirementsbeforeyouproceedwithyourOracleSolarisClusterHAforApacheTomcatinstallationandconfiguration.
Caution–Yourdataserviceconfigurationmightnotbesupportedifyoudonotadheretotheserequirements.
LocationoftheTomcatHomeDirectoryforScalableorMultipleMastersConfigurationsIfyouintendtoinstallApacheTomcatinascalableresourcegroup,createtheTomcatHomedirectoryanditsdynamicdataonlocalstorage.
ThisisrequiredbecauseApacheTomcatusesthedirectorystructuretostoreitsconfiguration,logs,deployedapplications,andsoon.
Ifyourlocalstorageisnotlargeenough,youcanuseaGlobalFileSystemonthesharedstorage.
PlanningtheOracleSolarisClusterHAforApacheTomcatInstallationandConfigurationOracleSolarisClusterDataServiceforApacheTomcatGuideMarch2012,E26824–0116Caution–Inthisscenario,thedeploymentofTomcatapplicationsneedstooccuroneverynodewhereApacheTomcatishosted.
LoadBalancingforMultipleMasterConfigurationsIfyouintendtoinstallApacheTomcatinamultiplemasterconfiguration,anexternalloadbalancerisrequired.
LocationoftheTomcatHomeDirectoryforFailoverConfigurationsIfyouintendtoinstallApacheTomcatinafailoverresourcegroup,createtheTomcatHomedirectoryonthesharedstorage.
ThelocationfortheTomcatHomedirectorycanresideonaGlobalFileSystem(GFS)oritcanresideonaFailoverFileSystem(FFS)withanHAStoragePlusresource.
ItisbestpracticetostoreitonaFFS.
ThisisrequiredbecauseApacheTomcatusesthedirectorystructuretostoreitsconfiguration,logs,deployedapplications,andsoon.
Itisnotrecommendedtostorethebinarieslocalandthedynamicpartsofthedataonthesharedstorage.
Note–ItisbestpracticetomountGlobalFileSystemswiththe/globalprefixandtomountFailoverFileSystemswiththe/localprefix.
LocationofthewgetCommandforApacheTomcat5.
5.
28,6.
0.
28,6.
0.
29,and7.
06TosupportthewgetprobealgorithmforApacheTomcat5.
5.
28,6.
0.
28,6.
0.
29,and7.
06,thewgetcommandmustbeavailablefromeverynodeofthecluster.
ApacheTomcatComponentDependenciesYoucanconfiguretheOracleSolarisClusterHAforApacheTomcatdataservicetoprotectoneormoreApacheTomcatinstances.
EachinstanceneedstobecoveredbyoneApacheTomcatresource.
ThedependenciesbetweentheApacheTomcatresourceandotherneededresourcesaredescribedinTable1–3,Table1–4,Table1–5,orTable1–6.
TABLE1–3DependenciesBetweenHAforApacheTomcatComponentsinFailoverConfigurationsComponentDependencyApacheTomcatresourceintheglobalzoneSUNW.
HAStoragePlus–Thisdependencyisrequiredonlyiftheconfigurationusesafailoverfilesystem.
SUNW.
LogicalHostNamePlanningtheOracleSolarisClusterHAforApacheTomcatInstallationandConfigurationChapter1InstallingandConfiguringOracleSolarisClusterHAforApacheTomcat17TABLE1–3DependenciesBetweenHAforApacheTomcatComponentsinFailoverConfigurations(Continued)ComponentDependencyApacheTomcatresourceinafailoverzoneOracleSolarisClusterHAfortheSolarisZonebootresource.
SUNW.
HAStoragePlusSUNW.
LogicalHostName–Thisdependencyisrequiredonlyifthezonesbootresourcedoesnotmanagethezone'sIPaddress.
Becauseofthespecialrequirementsofascalableconfiguration,youneednodependenciestostorageoraddresses,aslongaseveryApacheTomcatanditsparameterfilepfileisstoredontherootfilesystem.
Otherwise,followTable1–4.
TABLE1–4DependenciesScalableComponentDescriptionStorageResourceThisresourcecanbeaSUNW.
HAStorageoraSUNW.
HAStoragePlusresourcetype.
ApacheTomcat(Mandatory)Storageresource.
TheStorageresourcemanagestheApacheTomcatFileSystemMountpointsandensuresthatApacheTomcatisnotstarteduntiltheyaremounted.
Sharedaddress(Mandatory)Thesharedaddressresourceresidesinaseparateresourcegrouponwhichthescalableresourcegroupdepends.
Amultiplemasterconfigurationisrunningonmorethanonenodeslikeascalableconfiguration,butwithoutasharedaddress.
Becauseofthespecialrequirementsofamultiplemastersconfiguration,youneednodependenciestostorageoraddresses,aslongaseveryApacheTomcatanditsparameterfilepfileisstoredontherootfilesystem.
Otherwise,followTable1–5.
TABLE1–5DependenciesBetweenHAforApacheTomcatComponentsinFailoverConfigurationsComponentDependencyApacheTomcatresourceintheglobalzoneSUNW.
HAStoragePlus.
Thisdependencyisrequiredonly,iftheconfigurationusesafailoverfilesystem.
ApacheTomcatresourceinafailoverzoneOracleSolarisClusterHAfortheSolarisZonebootresource.
SUNW.
HAStoragePlusIfmoreelaboratedependenciesarerequired,seether_properties(5)andrg_properties(5)manpagesforfurtherdependenciesandaffinitiessettings.
PlanningtheOracleSolarisClusterHAforApacheTomcatInstallationandConfigurationOracleSolarisClusterDataServiceforApacheTomcatGuideMarch2012,E26824–0118Note–FormoredetailedinformationaboutApacheTomcat,refertothehttp://jakarta.
apache.
orgwebpage.
ASUNW.
HAStoragePlusresourcerequiresaResource_offline_restartdependencytype,whileallotherresourcesrequireastrongdependencytypecalledResource_dependencies.
YoumustdefinetheResource_offline_restartdependencyfortheSUNW.
HAStoragePlusresourceiftheresourcetypeversionisatleastversion9.
SeeTable1–6forthedependencytypeneededforeachresource.
Thefollowingresourcesareexamplesandyoushouldevaluatethedependencytootherresourcesonacase-by-casebasis.
TABLE1–6DependencyTypesforHAforApacheTomcatResourcesResourceNameDependencyTypeSUNW.
HAStoragePlusResource_offline_restartSUNW.
HAStorageResource_dependenciesSUNW.
LogicalHostNameResource_dependenciesHAforApacheTomcatConfigurationandRegistrationFilesApacheTomcatcomponenthasconfigurationandregistrationfilesinthedirectory/opt/SUNWsctomcat/util.
ThesefilesletyouregistertheApacheTomcatcomponentwithOracleSolarisCluster.
Withinthesefiles,theappropriatedependencieshavebeenapplied.
#cd/opt/SUNWsctomcat##ls-lutiltotal4-rwxr-xr-x1rootbin1619Apr2911:57sctomcat_config-r-xr-xr-x1rootbin7058Apr2911:58sctomcat_register-r-xr-xr-x1rootbin3752Apr2911:57sctomcat_smf_register-r-xr-xr-x1rootbin1350Apr2911:58sctomcat_smf_remove#moreutil/*gutil/sctomcat_config##Copyright2006,2012,Oracleand/oritsaffiliates.
Allrightsreserved.
##ident"@(#)sctomcat_config.
ksh1.
201/03/12"#Thisfilewillbesourcedinbysctomcat_registerandtheparameters#listedbelowwillbeused.
##Theseparameterscanbecustomizedin(key=value)formPlanningtheOracleSolarisClusterHAforApacheTomcatInstallationandConfigurationChapter1InstallingandConfiguringOracleSolarisClusterHAforApacheTomcat19##RS-nameoftheresourcefortheapplication#RG-nameoftheresourcegroupcontainingRS#PORT-nameoftheportnumber#LH-nameoftheLogicalHostnameSCresource#SCALABLE-trueforascalableresourceorfalseforafailoverresource#NETWORK-falseortrue,falseformultiplemasterconfigurationswithout#sharedaddress,inthiscaseSCALABLEwillbeignored##PFILE-absolutepathtotheparameterfilefortheTomcatresource#HAS_RS-nameoftheHAStoragePlusSCresource#(itcanbea,separatedlistforthedependencies)##Thefollowingvariablesneedtobesetonlyiftheagentrunsina#localzone#ZONE-thezonenamewheretheApacheTomcatshouldrunin#Optional#ZONEBT-Theresourcenamewhichcontrolsthezone.
#Optional#PROJECT-Aprojectinthezone,thatwillbeusedforthisservice#specifyitifyouhaveansu-inthestartstoporprobe,#ortodefinethesmfcredentials.
Ifthevariableisnotset,#itwillbetranslatedas:defaultforthesmfmanifest#OptionalRS=RG=PORT=LH=NETWORK=falseSCALABLE=falsePFILE=HAS_RS=#localzonespecificoptionsZONE=ZONE_BT=PROJECT=InstallingandConfiguringApacheTomcatThissectioncontainstheproceduresyouneedtoinstallandconfigureApacheTomcat.
Note–FormoreinformationaboutApacheTomcat,refertothehttp://jakarta.
apache.
orgwebpage.
DeterminehowApacheTomcatwillbedeployedinOracleSolarisCluster:DeterminewhichversionofApacheTomcatwillbedeployed.
DeterminehowmanyApacheTomcatinstanceswillbedeployed.
DeterminewhichClusterFileSystemwillbeusedbyeachApacheTomcatinstance.
InstallingandConfiguringApacheTomcatOracleSolarisClusterDataServiceforApacheTomcatGuideMarch2012,E26824–0120DeterminethetypeofthetargetzonewhereyouwillinstallApacheTomcat.
Validzonetypesincludetheglobalzoneorthefailoverzone.
ToinstallandconfigureApacheTomcatinaglobalzoneconfiguration,completethefollowingtasks:"HowtoEnableApacheTomcattoruninaGlobalZoneConfiguration"onpage21"HowtoInstallandConfigureApacheTomcatintheGlobalZone"onpage24ToinstallandconfigureApacheTomcatinafailoverzoneconfiguration,completethefollowingtasks:"HowtoEnableApacheTomcattoruninFailoverZoneConfiguration"onpage26"HowtoInstallandConfigureApacheTomcatinaFailoverZone"onpage27Youwillfindinstallationexamplesforeachzonetypein:AppendixA,"DeploymentExample:InstallingApacheTomcatintheGlobalZone"AppendixB,"DeploymentExample:InstallingApacheTomcatinaFailoverZone"HowtoEnableApacheTomcattoruninaGlobalZoneConfigurationBecomesuperuserorassumearolethatprovidessolaris.
cluster.
adminRBACauthorizationononeofthenodesintheclusterthatwillhostApacheTomcat.
RegistertheSUNW.
gdsandSUNW.
HAStoragePlusresourcetype.
#clresourcetyperegisterSUNW.
gdsSUNW.
HAStoragePlusCreateafailoverresourcegroup.
Note–Performthissteponlyifyoucreateafailoverdataservice.
#clresourcegroupcreateApacheTomcat-failover-resource-group(Optional)CreatearesourcefortheApacheTomcatDiskStorage.
Note–Performthissteponlyifyoucreateafailoverdataservice.
#clresourcecreate\-gApache-Tomcat-failover-resource-group\-tSUNW.
HAStoragePlus\-pFilesystemMountPoints=ApacheTomcat-instance-mount-pointsApache-Tomcat-has-resource1234InstallingandConfiguringApacheTomcatChapter1InstallingandConfiguringOracleSolarisClusterHAforApacheTomcat21(Optional)CreatearesourcefortheApacheTomcatLogicalHostname.
Note–Performthisstepforafailoverdataservice.
#clreslogicalhostname\-gApacheTomcat-failover-resource-group\-hApacheTomcat-logical-hostnameApacheTomcat-lh-resourceEnablethefailoverresourcegroupthatnowincludestheApacheTomcatDiskStorageandLogicalHostnameresources.
Note–Performthisstepforafailoverdataservice.
#clresourcegrouponline-emM-ncurrent-nodeApacheTomcat-failover-resource-group(Optional)Createtheresourcegroupforthemultiplemastersdataservice.
Note–Performthissteponlyifyoucreateamultiplemastersdataservice.
#clresourcegroupcreate\-pMaximum_primaries=2\-pDesired_primaries=2Apache-Tomcat-Scalable-resource-groupIfyouneedmorenodes,adjustMaximum_primariesandDesired_primariestotheappropriatevalue.
(Optional)CreatearesourcefortheApacheTomcatDiskStorageifitisnotintherootfilesystem.
Note–Performthissteponlyifyoucreateamultiplemastersdataservice.
#clresourcecreate\-gApache-Tomcat-failover-resource-group\-tSUNW.
HAStoragePlus\-pFilesystemMountPoints=ApacheTomcat-instance-mount-pointsApache-Tomcat-has-resourceEnablethemultiplemasterresourcegroupthatnowincludestheApacheTomcatDiskStorageandLogicalHostnameresources.
Note–Performthissteponlyifyoucreateamultiplemastersdataservice.
#clresourcegrouponline-emMApacheTomcat-failover-resource-groupCreateafailoverresourcegroupfortheSharedAddressresource.
5678910InstallingandConfiguringApacheTomcatOracleSolarisClusterDataServiceforApacheTomcatGuideMarch2012,E26824–0122Note–Performthissteponlyifyoucreateascalabledataservice.
#clresourcegroupcreateApache-Tomcat-SharedAddress-resource-groupCreatetheSharedAddressresource.
Note–Performthissteponlyifyoucreateascalabledataservice.
#clressharedaddresscreate\-gApache-Tomcat-SharedAddress-resource-group\-hApache-Tomcat-SharedAddress-hostname\Apache-Tomcat-SharedAddress-resourceOnlinetheSharedAddressresourcegroup.
Note–Performthissteponlyifyoucreateascalabledataservice.
#clresourcegrouponline-emMApache-Tomcat-SharedAddress-resource-groupCreatetheresourcegroupforthescalableservice.
Note–Performthissteponlyifyoucreateascalabledataservice.
#clresourcegroupcreate\-pMaximum_primaries=2\-pDesired_primaries=2\-pRG_dependencies=Apache-Tomcat-SharedAddress-resource-group\Apache-Tomcat-Scalable-resource-groupIfyouneedmorenodes,adjustMaximum_primariesandDesired_primariestotheappropriatevalue.
CreatearesourcefortheApacheTomcatDiskStorageifitisnotintherootfilesystem.
Note–Performthissteponlyifyoucreateascalabledataservice.
#clresourcecreateApache-Tomcat-has-resource\-gApache-Tomcat-scalable-group\-tSUNW.
HAStoragePlus\-pFilesystemMountPoints=ApacheTomcat-instance-mount-pointsEnablethefailoverresourcegroupthatnowincludestheApacheTomcatDiskStorageandLogicalHostnameresources.
1112131415InstallingandConfiguringApacheTomcatChapter1InstallingandConfiguringOracleSolarisClusterHAforApacheTomcat23Note–Performthissteponlyifyoucreateascalabledataservice.
#clresourcegrouponline-emMApacheTomcat-resource-groupHowtoInstallandConfigureApacheTomcatintheGlobalZoneDeterminehowApacheTomcatwillbedeployedinOracleSolarisClusterDeterminewhetheryouwilluseApacheTomcatasafailoveroramultiplemaster,orascalabledataservice.
Forconceptualinformationonscalableandfailoverdataservices,seeOracleSolarisClusterConceptsGuide.
DeterminewhichusernamewillrunApacheTomcat.
DeterminehowmanyApacheTomcatversionsandinstanceswillbedeployed.
Ifmorethanoneinstanceofaversionwillbedeployed,determinewhethertheysharethebinaries.
DeterminewhichClusterFileSystemwillbeusedbyeachApacheTomcatinstance.
Becomesuperuserorassumearolethatprovidessolaris.
cluster.
modifyandsolaris.
cluster.
adminRBACauthorizations.
Createauserandagroupifrequired.
Caution–Inthisscenario,thedeploymentoftheTomcatgroupanduserneedstooccuroneverynodewhereApacheTomcatishosted.
IfApacheTomcatistorununderanonrootuser,youhavetocreatetheappropriateuserandtheappropriategroup.
Forthesetasks,usethefollowingcommands.
a.
Createthegroup.
#groupadd—g1000tomcatb.
Createtheuser.
#useradd—u1000—g1000—d/global/tomcat—s/bin/kshtomcatIfyouarenotloggedinasroot,switchtotheappropriateusername.
#su—user-name1234InstallingandConfiguringApacheTomcatOracleSolarisClusterDataServiceforApacheTomcatGuideMarch2012,E26824–0124InstallApacheTomcat.
IfyoudeployApacheTomcatasafailoverdataservice,installApacheTomcatontoasharedfilesystemwithinOracleSolarisCluster.
YoushouldinstallApacheTomcatontoshareddisks.
Foradiscussionoftheadvantagesanddisadvantagesofinstallingthesoftwareonalocalversusaclusterfilesystem,see"DeterminingtheLocationoftheApplicationBinaries"inOracleSolarisClusterDataServicesPlanningandAdministrationGuide.
IfyouwilldeployApacheTomcatasafailoverdataserviceinstalltheApacheTomcatbinariesonthesharedstorageononenode.
IfApacheTomcatwillbedeployedasascalableoramultiplemasterdataservice,installtheApacheTomcatbinariesonthelocalstorageoneverynode,thatwillhosttheApacheTomcatdataservice.
Note–Refertohttp://tomcat.
apache.
org/index.
htmlforinstructionsaboutinstallingApacheTomcat.
IfyoudeployApacheTomcatasascalabledataserviceforascalableoramultiplemastersconfiguration,repeatthefollowingstepateverynodethatwillhostApacheTomcat.
Createtheenvironmentscript.
CreateaKornshelloraCshellscript(dependentonthelogin-shellofyourApacheTomcatusername)tosettheenvironmentvariablesforApacheTomcat.
Youmustsettheenvironmentvariablesinashellscriptandnotintheuser'sprofile.
WiththismechanismyoucaninstallandrunmultipleApacheTomcatversionsandinstancesunderoneusername.
Caution–TheseshellscriptsmustbeavailableoneverynodethatcanhosttheApacheTomcatdataservice.
Forafailoverconfiguration,storethemonthesharedstorageofthenodeorinthetargetzone.
Forascalableoramultiplemastersconfiguration,storethemonthelocalfilesystemofeverynodeoronthesharedstorage.
Thesescriptsmustbethesameonthevariousnodes.
KornshellscripttosettheenvironmentvariablesforApacheTomcat6.
0.
28#moreenv.
ksh#!
/usr/bin/ksh##EnvironmentforTomcat#JAVA_HOME=/usr/j2seexportJAVA_HOMECATALINA_HOME=/global/mnt1/jakarta-tomcat-6.
0.
28exportCATALINA_HOME56Example1–1InstallingandConfiguringApacheTomcatChapter1InstallingandConfiguringOracleSolarisClusterHAforApacheTomcat25CshellscripttosettheenvironmentvariablesforApacheTomcat#moreenv.
csh#!
/usr/bin/csh##EnvironmentforTomcat#setenvJAVA_HOME/usr/j2sesetenvCATALINA_HOME/global/mnt1/jakarta-tomcat-6.
0.
28Theenvironmentvariablesareversionandconfigurationdependent.
HowtoEnableApacheTomcattoruninFailoverZoneConfigurationBecomesuperuserorassumearolethatprovidessolaris.
cluster.
adminRBACauthorizationononeofthenodesintheclusterthatwillhostApacheTomcat.
AssuperuserregistertheSUNW.
HAStoragePlusandtheSUNW.
gdsresourcetypes.
#clresourcetyperegisterSUNW.
HAStoragePlusSUNW.
gdsCreateafailoverresourcegroup.
#clresourcegroupcreateApacheTomcat-resource-groupCreatearesourcefortheApacheTomcatzone'sdiskstorage.
#clresourcecreate-tSUNW.
HAStoragePlus\-pFileSystemMountPoints=ApacheTomcat-instance-mount-points\ApacheTomcat-has-resource(Optional)Ifyouwantprotectionagainstatotaladapterfailureforyourpublicnetwork,createaresourcefortheApacheTomcat'slogicalhostname.
#clreslogicalhostnamecreate-gApacheTomcat-resource-group\-hlogical-hostnameApacheTomcat-logical-hostname-resource-namePlacetheresourcegroupinthemanagedstate.
#clresourcegrouponline-emMApacheTomcat-resource-groupInstallthezone.
InstallthezoneaccordingtotheOracleSolarisClusterHAforSolarisZonesagentdocumentation,assumingthattheresourcenameisApacheTomcat-zone-rsandthatthezonenameisApacheTomcat-zone.
Verifythezone'sinstallation.
#zoneadm-zApacheTomcat-zoneboot#zoneadm-zApacheTomcat-zonehaltExample1–212345678InstallingandConfiguringApacheTomcatOracleSolarisClusterDataServiceforApacheTomcatGuideMarch2012,E26824–0126Registerthezone'sbootcomponent.
a.
Copythezoneresourcebootcomponentconfigurationfile.
#cp/opt/SUNWsczone/sczbt/util/sczbt_configzones-target-configuration-fileb.
Useatexteditortosetthefollowingvariables:RS=ApacheTomcat-zone-rsRG=ApacheTomcat-resource-groupPARAMETERDIR=ApacheTomcat-zone-parameter-directorySC_NETWORK=true|falseSC_LH=ApacheTomcat-logical-hostname-resource-nameFAILOVER=true|falseHAS_RS=ApacheTomcat-has-resourceZonename=ApacheTomcat-zoneZonebootopt=zone-boot-optionsMilestone=zone-boot-milestoneMounts=c.
Createtheparameterdirectoryforyourzone'sresource.
#mkdirApacheTomcat-zone-parameter-directoryd.
ExecutetheOracleSolarisClusterHAforSolarisZone'sregistrationscript.
#/opt/SUNWsczone/sczbt/util/sczbt_register-fzones-target-configuration-filee.
EnabletheSolarisZoneresource.
#clresourceenableApacheTomcat-zone-rsEnabletheresourcegroup.
#clresourcegrouponline-emMApacheTomcat-resource-groupHowtoInstallandConfigureApacheTomcatinaFailoverZoneDeterminehowApacheTomcatwillbedeployedinOracleSolarisClusterDeterminewhetheryouwilluseApacheTomcatasafailoveroramultiplemaster,orascalabledataservice.
Forconceptualinformationonscalableandfailoverdataservices,seeOracleSolarisClusterConceptsGuide.
DeterminewhichusernamewillrunApacheTomcat.
DeterminehowmanyApacheTomcatversionsandinstanceswillbedeployed.
Ifmorethanoneinstanceofaversionwillbedeployed,determinewhethertheysharethebinaries.
DeterminewhichClusterFileSystemwillbeusedbyeachApacheTomcatinstance.
9101InstallingandConfiguringApacheTomcatChapter1InstallingandConfiguringOracleSolarisClusterHAforApacheTomcat27Becomesuperuserorassumearolethatprovidessolaris.
cluster.
modifyandsolaris.
cluster.
adminRBACauthorizations.
Createuserandgroupifrequired.
IfApacheTomcatistorununderanonrootuser,youhavetocreatetheappropriateuserandtheappropriategroup.
Forthesetasksusethefollowingcommands.
a.
Createthegroup.
#groupadd—g1000tomcatb.
Createtheuser.
#useradd—u1000—g1000—d/global/tomcat—s/bin/kshtomcatIfyouarenotloggedinasroot,switchtotheappropriateusername.
#su—user-nameInstallApacheTomcat.
IfyoudeployApacheTomcatasafailoverdataservice,installApacheTomcatontoasharedfilesystemorinafailoverzonewithinOracleSolarisCluster.
ItisrecommendedthatyouinstallApacheTomcatontoshareddisks.
Foradiscussionoftheadvantagesanddisadvantagesofinstallingthesoftwareonalocalversusaclusterfilesystem,see"DeterminingtheLocationoftheApplicationBinaries"inOracleSolarisClusterDataServicesPlanningandAdministrationGuide.
IfyouplantodeployApacheTomcatasafailoverdataservice,installtheApacheTomcatbinariesonthesharedstorageononenodeorinthefailoverzone.
IfApacheTomcatwillbedeployedasamultiplemasterdataservice,installtheApacheTomcatbinariesonthelocalstorageineverytargetzonethatwillhosttheApacheTomcatdataservice.
Note–Refertohttp://tomcat.
apache.
org/index.
htmlforinstructionsaboutinstallingApacheTomcat.
IfyoudeployApacheTomcatasamultiplemastersdataservice,repeatthefollowingstepateverynodeortargetzonethatwillhostApacheTomcat.
Createtheenvironmentscript.
CreateaKornshelloraCshellscript(dependentonthelogin-shellofyourApacheTomcatusername)tosettheenvironmentvariablesforApacheTomcat.
Youmustsettheenvironmentvariablesinashellscriptandnotintheuser'sprofile.
WiththismechanismyoucaninstallandrunmultipleApacheTomcatversionsandinstancesunderoneusername.
23456InstallingandConfiguringApacheTomcatOracleSolarisClusterDataServiceforApacheTomcatGuideMarch2012,E26824–0128Caution–TheseshellscriptsmustbeavailableoneveryzonethatcanhosttheApacheTomcatdataservice.
Forafailoverconfiguration,storethemonthesharedstorageofthenodeorinthetargetzone.
Foramultiplemastersconfiguration,storethemonthelocalfilesystemoronthesharedstorageofthetargetzone.
Thesescriptsmustbethesameonthevariouszones.
Foraninstallationinafailoverzone,anyplacewheretheTomcatuserhasaccessisappropriate.
KornshellscripttosettheenvironmentvariablesforApacheTomcat6.
0.
28#moreenv.
ksh#!
/usr/bin/ksh##EnvironmentforTomcat#JAVA_HOME=/usr/j2seexportJAVA_HOMECATALINA_HOME=/global/mnt1/jakarta-tomcat-6.
0.
28exportCATALINA_HOMECshellscripttosettheenvironmentvariablesforApacheTomcat6.
0.
28#moreenv.
csh#!
/usr/bin/csh##EnvironmentforTomcat#setenvJAVA_HOME/usr/j2sesetenvCATALINA_HOME/global/mnt1/jakarta-tomcat-6.
0.
28Theenvironmentvariablesareversionandconfigurationdependent.
VerifyingtheInstallationandConfigurationofApacheTomcatThissectioncontainstheprocedureyouneedtoverifytheinstallationandconfigurationofApacheTomcat.
HowtoVerifytheInstallationandConfigurationofApacheTomcatThisproceduredoesnotverifythatyourapplicationishighlyavailablebecauseyouhavenotinstalledyourdataserviceyet.
StarttheApacheTomcat.
SwitchtotheTomcatusernameinthetargetzone(inthefollowingexample,itisroot)andchangetothedirectorywheretheenvironmentscriptislocated.
InthefollowingexampletheTomcatversionis6.
0.
28.
Example1–3Example1–41VerifyingtheInstallationandConfigurationofApacheTomcatChapter1InstallingandConfiguringOracleSolarisClusterHAforApacheTomcat29Note–Theoutputmessagesofthestartandshutdowncommandsareversiondependent.
#.
.
/env.
ksh#cd$CATALINA_HOME/bin#.
/startup.
shUsingCATALINA_BASE:/tomcat/jakarta-tomcat-6.
0.
28UsingCATALINA_HOME:/tomcat/jakarta-tomcat-6.
0.
28UsingCATALINA_TMPDIR:/tomcat/jakarta-tomcat-6.
0.
28/tempUsingJAVA_HOME:/usr/j2seChecktheInstallationStartawebbrowserandconnecttotheclusternodewithhttp://nodename:8080.
IfyouseethedefaultTomcathomepage,everythingisworkingcorrectly.
StoptheApacheTomcat.
#.
/shutdown.
shUsingCATALINA_BASE:/tomcat/jakarta-tomcat-6.
0.
28UsingCATALINA_HOME:/tomcat/jakarta-tomcat-6.
0.
28UsingCATALINA_TMPDIR:/tomcat/jakarta-tomcat-6.
0.
28/tempUsingJAVA_HOME:/usr/j2seHowtoDeploytheApacheTomcatApplicationIfyouconfigureApacheTomcatasafailoverresource,executethefollowingstepsononenode.
IfyoudeployApacheTomcatasascalableconfiguration,repeatthefollowingstepsoneverynode.
Caution–Forascalableconfiguration,theApacheTomcatconfigurationmustbethesameonalltheTomcathosts.
Becomesuperuserorassumearolethatprovidessolaris.
cluster.
modifyandsolaris.
cluster.
adminRBACauthorizations.
Modifytheconfigurationfilesserver.
xmlandtheTomcatuserconfigurationtothedesiredcontent.
Formoreinformation,seehttp://tomcat.
apache.
org/index.
html.
StartApacheTomcatasdescribedin"HowtoVerifytheInstallationandConfigurationofApacheTomcat"onpage29.
Deployyourapplication.
Formoreinformation,seehttp://tomcat.
apache.
org/index.
html.
231234VerifyingtheInstallationandConfigurationofApacheTomcatOracleSolarisClusterDataServiceforApacheTomcatGuideMarch2012,E26824–0130Testyourapplication.
Forexample,connectwithawebbrowsertotheHostwiththeappropriateportandselectthestartpageofyourapplication.
StopApacheTomcatasdescribedin"HowtoVerifytheInstallationandConfigurationofApacheTomcat"onpage29.
TheportonwhichApacheTomcatisservingisrequiredfortheconfigurationoftheOracleSolarisClusterApacheTomcatresource.
ItisbestpracticetousethestartpageofthedeployedapplicationfortheFaultMonitoring.
Inthiscase,theTestCmddescribedin"UnderstandingtheOracleSolarisClusterApacheTomcatHAParameterFile"onpage46canbeget/start_page.
Withthisprocedure,youmonitorApacheTomcatandtheapplicationitisserving.
InstallingtheHAforApacheTomcatPackageIfyoudidnotinstalltheHAforApacheTomcatpackageduringyourinitialOracleSolarisClusterinstallation,performthisproceduretoinstallthepackage.
HowtoInstalltheHAforApacheTomcatPackagePerformthisprocedureoneachclusternodewhereyouwanttheHAforApacheTomcatsoftwaretorun.
Ontheclusternodewhereyouareinstallingthedataservicepackage,becomesuperuser.
Ensurethatthesolarisandha-clusterpublishersarevalid.
#pkgpublisherPUBLISHERTYPESTATUSURIsolarisoriginonlinesolaris-repositoryha-clusteroriginonlineha-cluster-repositoryForinformationaboutsettingthesolarispublisher,see"SetthePublisherOriginTotheFileRepositoryURI"inCopyingandCreatingOracleSolaris11PackageRepositories.
InstalltheHAforApacheTomcatsoftwarepackage.
#pkginstallha-cluster/data-service/tomcatVerifythatthepackageinstalledsuccessfully.
$pkginfoha-cluster/data-service/tomcatInstallationissuccessfulifoutputshowsthatStateisInstalled.
561234InstallingtheHAforApacheTomcatPackageChapter1InstallingandConfiguringOracleSolarisClusterHAforApacheTomcat31PerformanynecessaryupdatestotheOracleSolarisClustersoftware.
Forinstructionsonupdatingsingleormultiplepackages,seeChapter11,"UpdatingYourSoftware,"inOracleSolarisClusterSystemAdministrationGuide.
RegisteringandConfiguringOracleSolarisClusterHAforApacheTomcatThissectioncontainstheproceduresyouneedtoconfigureOracleSolarisClusterHAforApacheTomcat.
HowtoRegisterandConfigureOracleSolarisClusterHAforApacheTomcatasaFailoverDataServiceThisprocedureassumesthatyouinstalledthedataservicepackages.
IfyoudidnotinstalltheOracleSolarisClusterHAforApacheTomcatpackages,goto"InstallingtheHAforApacheTomcatPackage"onpage31.
ItisassumedthatthefilesystemofApacheTomcatwillbemountedasafailoverfilesystem.
Preparetheparameterfile,whichisrequiredbytheOracleSolarisClusterHAforApacheTomcat.
#cd/opt/SUNWsctomcat/bin#cppfiledesired-placeEdittheparameterfilepfileandfollowthecommentswithinthatfile.
Forexample:#!
/usr/bin/ksh##Copyright(c)2006,2012,Oracleand/oritsaffiliates.
Allrightsreserved.
##ident"@(#)pfile.
ksh1.
601/12/16"#SettheApacheTomcatspecificenvironmentvariableswhichthestart,stop#andcheckfuctionswilluse##EnvScriptScripttosetruntimeenvironmentfortomcat#UserApacheTomcatUser#BasepathAbsolutepathtoTomcatHomedirectoryi.
e.
5.
xor6.
xCATALINA_HOME#HostHostnametotestApacheTomcat#PortPortwhereApacheTomcatisconfigured#TestCmdApacheTomcattestcommand##SomeversionsofApacheTomcatdonotreactontheprobealgorithmwiththe#httpgetcommand.
Becauseofthisweprovideanalternativeprobemethod#whichuseswget.
Ifwgetisnotinstalledonyoursystemyoumustinstallit#manuallyandprovidetheWgetPathvariable.
IftheWgetPathvariableisnotset,51RegisteringandConfiguringOracleSolarisClusterHAforApacheTomcatOracleSolarisClusterDataServiceforApacheTomcatGuideMarch2012,E26824–0132#itdefaultsto/usr/sfw/bin/wget.
#Youcanusethewgetalgorithmforhttpsprobeaswellwhicharenotpossible#withthehttpgetcommand.
##UsethevariablesTestUrlandWgetPathasareplacementfor:#Port,Host,TestCmd#Youcanspecifyonlyonesetofvariables.
##TestUrlUrlwhereTomcatservesawebsite.
Thiscanbedoneeither#bythehttporhttpsprotocol#Format:http://hostname:port/startpage#Example:http://localhost:8080/#Youmightwanttoincludeoptionsherelike:#"--no-cookieshttp://localhost:8080/"#Therequirementhereisthatwget-O-${TestUrl}produces#theoutputcontainingtheReturnString.
#WgetPathAbolutepathtowget,leavingthisvariableemptydefaultsto:#/usr/sfw/bin/wget#StartwaitSleeping$Startwaitsecondsaftercompletionofthe#startcommand#ReturnStringThisstringmustbepresentintheoutputofthehttpgetcommand#orintheoutputofthewgetcommand.
EnvScript=User=Basepath=Host=Port=8080TestCmd="get/index.
jsp"TestUrl=WgetPath=ReturnString="CATALINA"Startwait=20ThefollowingisanexampleforApacheTomcat5.
5.
27.
EnvScript=/global/mnt1/tomtest/env.
kshUser=tomtestBasepath=/global/mnt1/tomtest/jakarta-tomcat-5.
5.
27Host=tomcat-lhPort=8080TestCmd="get/index.
jsp"TestUrl=WgetPath=ReturnString="CATALINA"Startwait=20ThisexampleforApacheTomcat5.
5.
27configuresastandalonewebserverwiththedefaultstartpageindex.
jsp.
ThestartpagecontainsthestringCATALINA.
Tousethealternativewgetprobe,assumingwgetisavailableunder/usr/sfw/bin/wget,insteadsetthefollowingvariables:EnvScript=/global/mnt1/tomtest/env.
kshUser=tomtestBasepath=/global/mnt1/tomtest/jakarta-tomcat-6.
0.
28Host=Port=RegisteringandConfiguringOracleSolarisClusterHAforApacheTomcatChapter1InstallingandConfiguringOracleSolarisClusterHAforApacheTomcat33TestCmd=TestUrl="http://tomcat-lh:8080/"WgetPath=ReturnString="CATALINA"Startwait=20Caution–TheparameterfilesmustbeavailableoneverynodethatcanhosttheApacheTomcatdataservice.
Forascalableormultiple-mastersconfiguration,storetheparameterfilesonthelocalfilesystemofeverynodeoronthesharedstorage.
TheparameterfilescannotdifferforanyinstanceofApacheTomcatonthevariousnodes.
RepeatStep1foreveryApacheTomcatinstanceyouneed.
CreateandregistereachrequiredApacheTomcatcomponent.
#cd/opt/SUNWsctomcat/util#cpsctomcat_configdesiredplaceEditthesctomcat_configfileandfollowthecommentswithinthatfile.
Forexample:##Copyright(c)2006,2012,Oracleand/oritsaffiliates.
Allrightsreserved.
##ident"@(#)sctomcat_config.
ksh1.
201/03/12"#Thisfilewillbesourcedinbysctomcat_registerandtheparameters#listedbelowwillbeused.
##Theseparameterscanbecustomizedin(key=value)form##RS-nameoftheresourcefortheapplication#RG-nameoftheresourcegroupcontainingRS#PORT-nameoftheportnumber#LH-nameoftheLogicalHostnameSCresource#SCALABLE-trueforascalableresourceorfalseforafailoverresource#NETWORK-falseortrue,falseformultiplemasterconfigurationswithout#sharedaddress,inthiscaseSCALABLEwillbeignored##PFILE-absolutepathtotheparameterfilefortheTomcatresource#HAS_RS-nameoftheHAStoragePlusSCresource#(itcanbea,separatedlistforthedependencies)##Thefollowingvariablesneedtobesetonlyiftheagentrunsina#localzone#ZONE-thezonenamewheretheApacheTomcatshouldrunin#Optional#ZONEBT-Theresourcenamewhichcontrolsthezone.
#Optional#PROJECT-Aprojectinthezone,thatwillbeusedforthisservice#specifyitifyouhaveansu-inthestartstoporprobe,#ortodefinethesmfcredentials.
Ifthevariableisnotset,#itwillbetranslatedas:defaultforthesmfmanifest#OptionalRS=2RegisteringandConfiguringOracleSolarisClusterHAforApacheTomcatOracleSolarisClusterDataServiceforApacheTomcatGuideMarch2012,E26824–0134RG=PORT=LH=NETWORK=falseSCALABLE=falsePFILE=HAS_RS=#localzonespecificoptionsZONE=ZONE_BT=PROJECT=ThefollowingisanexampleforApacheTomcat.
RS=tomcat-resRG=tomcat-rgPORT=8080LH=tomcat-lhSCALABLE=falsePFILE=/global/mnt1/pfileNETWORK=trueHAS_RS=tomcat-hastplus-resAftereditingsctomcat_config,registertheresource.
#ksh.
/sctomcat_register-fdesiredplace/sctomcat_configRepeatthesestepsforeachApacheTomcatinstanceyouneed.
EnableeachApacheTomcatresource.
RepeatthisstepforeachApacheTomcatresourcecreatedinthestep10.
#clresourcestatus#clresourceenableApache-Tomcat-resourceHowtoRegisterandConfigureOracleSolarisClusterHAforApacheTomcatasaMultipleMastersDataServiceThisprocedureassumesthatyouinstalledthedataservicepackagesduringyourinitialOracleSolarisClusterinstallation.
IfyoudidnotinstalltheOracleSolarisClusterHAforApacheTomcatpackagesaspartofyourinitialOracleSolarisClusterinstallation,goto"InstallingtheHAforApacheTomcatPackage"onpage31.
Becomesuperuserorassumearolethatprovidessolaris.
cluster.
modifyandsolaris.
cluster.
adminRBACauthorizations.
341RegisteringandConfiguringOracleSolarisClusterHAforApacheTomcatChapter1InstallingandConfiguringOracleSolarisClusterHAforApacheTomcat35Preparetheparameterfile,whichisrequiredbytheOracleSolarisClusterHAforApacheTomcat.
#cd/opt/SUNWsctomcat/bin#cppfiledesired-placeEdittheparameterfileandfollowthecommentswithinthatfile.
Forexample:#!
/usr/bin/ksh##Copyright(c)2006,2012,Oracleand/oritsaffiliates.
Allrightsreserved.
###ident"@(#)pfile.
ksh1.
601/12/16"#SettheApacheTomcatspecificenvironmentvariableswhichthestart,stop#andcheckfuctionswilluse##EnvScriptScripttosetruntimeenvironmentfortomcat#UserApacheTomcatUser#BasepathAbsolutepathtoTomcatHomedirectoryi.
e.
5.
xor6.
xCATALINA_HOME#HostHostnametotestApacheTomcat#PortPortwhereApacheTomcatisconfigured#TestCmdApacheTomcattestcommand##SomeversionsofApacheTomcatdonotreactontheprobealgorithmwiththe#httpgetcommand.
Becauseofthisweprovideanalternativeprobemethod#whichuseswget.
Ifwgetisnotinstalledonyoursystemyoumustinstallit#manuallyandprovidetheWgetPathvariable.
IftheWgetPathvariableisnotset,#itdefaultsto/usr/sfw/bin/wget.
#Youcanusethewgetalgorithmforhttpsprobeaswellwhicharenotpossible#withthehttpgetcommand.
##UsethevariablesTestUrlandWgetPathasareplacementfor:#Port,Host,TestCmd#Youcanspecifyonlyonesetofvariables.
##TestUrlUrlwhereTomcatservesawebsite.
Thiscanbedoneeither#bythehttporhttpsprotocol#Format:http://hostname:port/startpage#Example:http://localhost:8080/#Youmightwanttoincludeoptionsherelike:#"--no-cookieshttp://localhost:8080/"#Therequirementhereisthatwget-O-${TestUrl}produces#theoutputcontainingtheReturnString.
#WgetPathAbolutepathtowget,leavingthisvariableemptydefaultsto:#/usr/sfw/bin/wget#StartwaitSleeping$Startwaitsecondsaftercompletionofthe#startcommand#ReturnStringThisstringmustbepresentintheoutputofthehttpgetcommand#orintheoutputofthewgetcommand.
EnvScript=EnvScript=User=Basepath=Host=Port=8080TestCmd="get/index.
jsp"TestUrl=WgetPath=ReturnString="CATALINA"Startwait=202RegisteringandConfiguringOracleSolarisClusterHAforApacheTomcatOracleSolarisClusterDataServiceforApacheTomcatGuideMarch2012,E26824–0136ThefollowingisanexampleforApacheTomcat5.
5.
27.
EnvScript=/tomcat/env.
kshUser=tomcatBasepath=/tomcat/jakarta-tomca-5.
5.
27Host=localhostPort=8080TestCmd="get/index.
jsp"TestUrl=WgetPath=ReturnString="CATALINA"Startwait=20ThisexampleforApacheTomcat5.
5.
27configuresastandalonewebserverwiththedefaultstartpageindex.
jsp.
ThestartpagecontainsthestringCATALINA.
Dependingontheselectedprobemethod,theHostparameterortheIPaliasintheTestUrlparameterdependsonthelocationofthepfile:Ifthepfileisstoredonthesharedstorage,youmustuselocalhost.
Ifthepfileisstoredonthelocalstorage,itcanbeeitherlocalhostorthenode'shostname.
Tousethealternativewgetprobe,assumingwgetisavailableunder/usr/sfw/bin/wget,setthefollowingvariables:EnvScript=/global/mnt1/tomtest/env.
kshUser=tomtestBasepath=/global/mnt1/tomtest/jakarta-tomcat-6.
0.
28Host=Port=TestCmd=TestUrl="http://localhost:8080/"WgetPath=ReturnString="CATALINA"Startwait=20Caution–TheparameterfilesmustbeavailableoneverynodethatcanhosttheApacheTomcatdataservice.
Forascalableoramultiple-mastersconfiguration,storetheparameterfilesonthelocalfilesystemofeverynodeoronthesharedstorage.
TheparameterfilesmustbethesameforeveryinstanceofApacheTomcatonthevariousnodes.
RepeatthisStepforeveryApacheTomcatinstanceandeverynodeyouneed.
CreateandregistereachrequiredApacheTomcatcomponent.
#cd/opt/SUNWsctomcat/util#cpsctomcat_configdesiredplaceEditthesctomcat_configfileandfollowthecommentswithinthatfile.
Forexample:##Copyright2006,2012,Oracleand/oritsaffiliates.
Allrightsreserved.
3RegisteringandConfiguringOracleSolarisClusterHAforApacheTomcatChapter1InstallingandConfiguringOracleSolarisClusterHAforApacheTomcat37##ident"@(#)sctomcat_config.
ksh1.
201/03/12"#Thisfilewillbesourcedinbysctomcat_registerandtheparameters#listedbelowwillbeused.
##Theseparameterscanbecustomizedin(key=value)form##RS-nameoftheresourcefortheapplication#RG-nameoftheresourcegroupcontainingRS#PORT-nameoftheportnumber#LH-nameoftheLogicalHostnameSCresource#SCALABLE-trueforascalableresourceorfalseforafailoverresource#NETWORK-falseortrue,falseformultiplemasterconfigurationswithout#sharedaddress,inthiscaseSCALABLEwillbeignored##PFILE-absolutepathtotheparameterfilefortheTomcatresource#HAS_RS-nameoftheHAStoragePlusSCresource#(itcanbea,separatedlistforthedependencies)##Thefollowingvariablesneedtobesetonlyiftheagentrunsina#localzone#ZONE-thezonenamewheretheApacheTomcatshouldrunin#Optional#ZONEBT-Theresourcenamewhichcontrolsthezone.
#Optional#PROJECT-Aprojectinthezone,thatwillbeusedforthisservice#specifyitifyouhaveansu-inthestartstoporprobe,#ortodefinethesmfcredentials.
Ifthevariableisnotset,#itwillbetranslatedas:defaultforthesmfmanifest#OptionalRS=RG=PORT=LH=NETWORK=falseSCALABLE=falsePFILE=HAS_RS=#localzonespecificoptionsZONE=ZONE_BT=PROJECT=ThefollowingisanexampleforApacheTomcat.
RS=tomcat-resRG=tomcat-rgPORT=8080LH=tomcat-lhSCALABLE=falseNETWORK=falsePFILE=/local/pfileHAS_RS=Apache-Tomcat-has-resourceRegisteringandConfiguringOracleSolarisClusterHAforApacheTomcatOracleSolarisClusterDataServiceforApacheTomcatGuideMarch2012,E26824–0138OmittheLHparameterherebecauseitwillnotbeused.
SettheparameterHAS_RSonlywhenanotherfilesystem(GFSorlocalfilesystem)isusedandtheappropriateApache-Tomcat-has-resourceiscreated.
TheZONE,ZONE_BT,andPROJECTvariablesareneededonlyifthemultiplemasterscontainerresourcesarezonesmanagedbythezoneagent.
Aftereditingsctomcat_config,registertheresource.
#ksh.
/sctomcat_register-fdesiredplace/sctomcat_configRepeatSteps7,8,and9foreveryApacheTomcatinstanceyouneed.
EnableeachApacheTomcatresource.
RepeatthisstepforeachApacheTomcatresourcecreatedinthepreviousstep.
#clresourcestatus#clresourceenableApache-Tomcat-resourceHowtoRegisterandConfigureOracleSolarisClusterHAforApacheTomcatasaScalableDataServiceThisprocedureassumesthatyouinstalledthedataservicepackagesduringyourinitialOracleSolarisClusterinstallation.
IfyoudidnotinstalltheOracleSolarisClusterHAforApacheTomcatpackagesaspartofyourinitialOracleSolarisClusterinstallation,goto"InstallingtheHAforApacheTomcatPackage"onpage31.
Becomesuperuserorassumearolethatprovidessolaris.
cluster.
modifyandsolaris.
cluster.
adminRBACauthorizations.
Preparetheparameterfile,whichisrequiredbytheOracleSolarisClusterHAforApacheTomcat.
#cd/opt/SUNWsctomcat/bin#cppfiledesired-placeEdittheparameterfilepfileandfollowthecommentswithinthatfile.
Forexample:#!
/usr/bin/ksh##Copyright(c)2006,2012,Oracleand/oritsaffiliates.
Allrightsreserved.
##ident"@(#)pfile.
ksh1.
601/03/12"#SettheApacheTomcatspecificenvironmentvariableswhichthestart,#stopandcheckfunctionswilluse##EnvScriptScripttosetruntimeenvironmentfortomcat#UserApacheTomcatusername4512RegisteringandConfiguringOracleSolarisClusterHAforApacheTomcatChapter1InstallingandConfiguringOracleSolarisClusterHAforApacheTomcat39#BasepathAbsolutepathnametoTomcatHomedirectoryi.
e.
5.
xor6.
xCATALINA_HOME#HostHostnametotestApacheTomcat#PortPortwhereApacheTomcatisconfigured#TestCmdApacheTomcattestcommand###SomeversionsofApacheTomcatdonotreactontheprobealgorithmwiththe#httpgetcommand.
Becauseofthisweprovideanalternativeprobemethod#whichuseswget.
Ifwgetisnotinstalledonyoursystemyoumustinstallit#manuallyandprovidetheWgetPathvariable.
IftheWgetPathvariableisnot#set,itdefaultsto/usr/sfw/bin/wget.
#Youcanusethewgetalgorithmforhttpsprobeaswellwhicharenotpossible#withthehttpgetcommand.
##UsethevariablesTestUrlandWgetPathasareplacementfor:#Port,Host,TestCmd#Youcanspecifyonlyonesetofvariables.
##TestUrlUrlwhereTomcatserveawebsite.
Thiscanbedoneeither#bythehttporhttpsprotocol#Format:http://hostname:port/startpage#Example:http://localhost:8080/#Youmightwanttoincludeoptionsherelike:#"--no-cookieshttp://localhost:8080/"#Therequirementhereisthatwget-O-${TestUrl}produces#theoutputcontainingtheReturnString.
#WgetPathAbolutepathtowget,leavingthisvariableemptydefaultsto:#/usr/sfw/bin/wget#StartwaitSleeping$Startwaitsecondsaftercompletionofthe#startcommand#ReturnStringThisstringmustbepresentintheoutputofthehttpget#commandorintheoutputofthewgetcommand.
EnvScript=User=Basepath=Host=Port=8080TestCmd="get/index.
jsp"TestUrl=WgetPath=ReturnString="CATALINA"Startwait=20Tousethealternativewgetprobe,assumingwgetisavailableunder/usr/sfw/bin/wget,setthefollowingvariables:EnvScript=/global/mnt1/tomtest/env.
kshUser=tomtestBasepath=/global/mnt1/tomtest/jakarta-tomcat-6.
0.
28Host=Port=TestCmd=TestUrl="http://localhost:8080/"WgetPath=ReturnString="CATALINA"Startwait=20RegisteringandConfiguringOracleSolarisClusterHAforApacheTomcatOracleSolarisClusterDataServiceforApacheTomcatGuideMarch2012,E26824–0140ThisexampleforApacheTomcat6.
0.
28configuresastandalonewebserverwiththedefaultstartpageindex.
jsp.
ThestartpagecontainsthestringCATALINA.
EnvScript=/tomcat/env.
kshUser=tomcatBasepath=/tomcat/jakarta-tomcat-6.
0.
28Host=localhostPort=8080TestCmd="get/index.
jsp"TestUrl=WgetPath=ReturnString="CATALINA"Startwait=20Dependingontheselectedprobemethod,theHostparameterortheIPaliasintheTestUrlparameterdependsonthelocationofthepfile:Ifthepfileisstoredonthesharedstorage,youmustuselocalhost.
Ifthepfileisstoredonthelocalstorage,itcanbeeitherlocalhostorthenode'shostname.
DonotusetheSharedAddresshere.
Caution–TheparameterfilesmustbeavailableoneverynodethatcanhosttheApacheTomcatdataservice.
Forascalableoramultiple-mastersconfiguration,storetheparameterfilesonthelocalfilesystemofeverynodeoronthesharedstorage.
TheparameterfilesmustbethesameforeveryinstanceofApacheTomcatonthevariousnodes.
RepeatthisStepforeveryApacheTomcatinstanceandeverynodeyouneed.
CreateandregistereachrequiredApacheTomcatcomponent.
#cd/opt/SUNWsctomcat/util#cpsctomcat_configdesiredplaceEditthesctomcat_configfileandfollowthecommentswithinthatfile,forexample:##Copyright2006,2012,Oracleand/oritsaffiliates.
Allrightsreserved.
##ident"@(#)sctomcat_config.
ksh1.
201/03/12"#Thisfilewillbesourcedinbysctomcat_registerandtheparameters#listedbelowwillbeused.
##Theseparameterscanbecustomizedin(key=value)form##RS-nameoftheresourcefortheapplication#RG-nameoftheresourcegroupcontainingRS#PORT-nameoftheportnumber#LH-nameoftheLogicalHostnameSCresource#SCALABLE-trueforascalableresourceorfalseforafailoverresource#NETWORK-falseortrue,falseformultiplemasterconfigurationswithout#sharedaddress,inthiscaseSCALABLEwillbeignored3RegisteringandConfiguringOracleSolarisClusterHAforApacheTomcatChapter1InstallingandConfiguringOracleSolarisClusterHAforApacheTomcat41##PFILE-absolutepathtotheparameterfilefortheTomcatresource#HAS_RS-nameoftheHAStoragePlusSCresource#(itcanbea,separatedlistforthedependencies)##Thefollowingvariablesneedtobesetonlyiftheagentrunsina#localzone#ZONE-thezonenamewheretheApacheTomcatshouldrunin#Optional#ZONEBT-Theresourcenamewhichcontrolsthezone.
#Optional#PROJECT-Aprojectinthezone,thatwillbeusedforthisservice#specifyitifyouhaveansu-inthestartstoporprobe,#ortodefinethesmfcredentials.
Ifthevariableisnotset,#itwillbetranslatedas:defaultforthesmfmanifest#OptionalRS=RG=PORT=LH=NETWORK=falseSCALABLE=falsePFILE=HAS_RS=#localzonespecificoptionsZONE=ZONE_BT=PROJECT=ThefollowingisanexampleforApacheTomcat.
RS=tomcat-resRG=tomcat-rgPORT=8080LH=tomcat-lhSCALABLE=trueNETWORK=truePFILE=/tomcat/pfileHAS_RS=Apache-Tomcat-has-resourceConfiguretheLHparameterasthenameofthesharedaddress.
SettheHAS_RSparameteronlywhenanotherfilesystem(GFSorlocalfilesystem)isusedandtheappropriateApache-Tomcat-has-resourceiscreated.
Aftereditingsctomcat_config,registertheresource.
#ksh.
/sctomcat_registerdesiredplace/sctomcat_configRepeatthesestepsforeveryApacheTomcatinstanceyouneed.
4RegisteringandConfiguringOracleSolarisClusterHAforApacheTomcatOracleSolarisClusterDataServiceforApacheTomcatGuideMarch2012,E26824–0142EnableeachApacheTomcatresource.
RepeatthisstepforeachApacheTomcatresourcecreatedinthepreviousstep.
#clresourcestatus#clresourceenableApache-Tomcat-resourceConfiguringOracleSolarisClusterHAforApacheTomcatinaFailoverZoneThissectiondescribestheadditionalstepsthatarenecessarytoconfigureOracleSolarisClusterHAforApacheTomcatinafailoverzone.
ConfiguringOracleSolarisClusterHAforApacheTomcatinaFailoverZoneHowtoRegisterOracleSolarisClusterHAforApacheTomcatinaFailoverZoneThisprocedureusestheconfigurationfiletoregisterOracleSolarisClusterHAforApacheTomcatinafailoverzone.
BeforeyouregisterOracleSolarisClusterHAforApacheTomcatinafailoverzone,performthefollowingtasks:InstallOracleSolarisClusterHAforZonesandOracleSolarisClusterHAforApacheTomcatdataservicepackagesintheglobalzoneofeachclusternodethatyouwanttorunthefailoverzone.
Createthefailoverzone.
Configurethebootcomponenttocontrolyourfailoverzone.
FollowtheproceduresintheOracleSolarisClusterDataServiceforOracleSolarisZonesGuide.
Becomesuperuserorassumearolethatprovidessolaris.
cluster.
modifyandsolaris.
cluster.
adminRBACauthorizations.
Makeacopyofthe/opt/SUNWsctomcat/util/sctomcat_configfiletouseasyourconfigurationfile.
Youcanplacethisconfigurationfileinanydirectorythatisaccessibletothefailoverzone.
RegisterOracleSolarisClusterHAforApacheTomcatwithSMF.
#ksh/opt/SUNWsctomcat/util/sctomcat_register-ffilename5BeforeYouBegin123ConfiguringOracleSolarisClusterHAforApacheTomcatinaFailoverZoneChapter1InstallingandConfiguringOracleSolarisClusterHAforApacheTomcat43-fSpecifiestheconfigurationfilename.
filenameTheconfigurationfilename.
TheregistrationofOracleSolarisClusterHAforApacheTomcatgeneratesanSMFmanifestandregistersanSMFserviceinthefailoverzonethatisspecifiedbytheZONEvariableintheconfigurationfile.
Themanifestisnamedresourcename.
xml,whereresourceisthenamethatisspecifiedbytheRSvariableintheconfigurationfile.
Thismanifestisplacedinthe/var/svc/manifest/application/sczone-agents/directory.
TheSMFserviceisnamedsvc:/application/sczone-agents/resource.
TheOracleSolarisClusterHAforApacheTomcatdataserviceusestheSMFcomponentoftheOracleSolarisClusterHAforZonesdataservicetocontrolandprobethisSMFserviceoftheOracleSolarisClusterHAforApacheTomcat.
ItregistersanOracleSolarisClusterHAforZonesSMFcomponentontopofthealready-createdSMFservice.
Thenameofthescriptthatstartsandstopsthemanifest,aswellasprobestheSMFcomponent,iscontrol_sctomcat.
HowtoModifyParametersintheOracleSolarisClusterHAforApacheTomcatManifestPerformthistasktochangeparametersintheOracleSolarisClusterHAforApacheTomcatmanifestandtovalidatetheparametersinthefailoverzone.
ParametersfortheOracleSolarisClusterHAforApacheTomcatmanifestarestoredaspropertiesoftheSMFservice.
Tomodifyparametersinthemanifest,changetherelatedpropertiesintheSMFserviceandthenvalidatetheparameterchanges.
Becomesuperuserorassumearolethatprovidessolaris.
cluster.
modifyandsolaris.
cluster.
adminRBACauthorizationsonthezonesconsole.
ChangetheSolarisServiceManagementFacility(SMF)propertiesfortheOracleSolarisClusterHAforApacheTomcatmanifest.
#svccfgsvc:/application/sczone-agents:resourceFormoreinformation,seethesvccfg(1M)manpage.
Validatetheparameterchanges.
#/opt/SUNWsctomcat/bin/control_sctomcatvalidateresourceMessagesforthiscommandarestoredinthe/var/adm/messages/directoryofthefailoverzone.
Disconnectfromthefailoverzone'sconsole.
1234ConfiguringOracleSolarisClusterHAforApacheTomcatinaFailoverZoneOracleSolarisClusterDataServiceforApacheTomcatGuideMarch2012,E26824–0144HowtoRemoveanOracleSolarisClusterHAforApacheTomcatResourceFromaFailoverZoneBecomesuperuserorassumearolethatprovidessolaris.
cluster.
modifyandsolaris.
cluster.
adminRBACauthorizations.
DisableandremovetheresourcethatisusedbytheOracleSolarisClusterHAforApacheTomcatdataservice.
#clresourcedisableresource#clresourcedeleteresourceLoginassuperusertothefailoverzone'sconsole.
UnregisterOracleSolarisClusterHAforApacheTomcatfromtheSolarisServiceManagementFacility(SMF)service.
#/opt/SUNWsctomcat/util/sctomcat_smf_remove-ffilename-fSpecifiestheconfigurationfilename.
filenameThenameoftheconfigurationfilethatyouusedtoregisterOracleSolarisClusterHAforApacheTomcatwiththeSMFservice.
Note–IfyounolongerhavetheconfigurationfilethatyouusedtoregisterOracleSolarisClusterHAforApacheTomcatwiththeSMFservice,createareplacementconfigurationfile:a.
Makeacopyofthedefaultfile,/opt/SUNWsctomcat/util/sctomcat_config.
b.
SettheZONEandRSparameterswiththevaluesthatareusedbythedataservice.
c.
Runthesctomcat_smf_removecommandandusethe-foptiontospecifythisconfigurationfile.
Disconnectfromthefailoverzone'sconsole.
VerifyingtheOracleSolarisClusterHAforApacheTomcatInstallationandConfigurationThissectioncontainstheproceduretoverifythatyouinstalledandconfiguredyourdataservicecorrectly.
12345VerifyingtheOracleSolarisClusterHAforApacheTomcatInstallationandConfigurationChapter1InstallingandConfiguringOracleSolarisClusterHAforApacheTomcat45HowtoVerifytheOracleSolarisClusterHAforApacheTomcatInstallationandConfigurationBecomesuperuserorassumearolethatprovidessolaris.
cluster.
modifyandsolaris.
cluster.
adminRBACauthorizations.
EnsurealltheApacheTomcatresourcesareonline.
#clusterstatusEnableeachApacheTomcatresourcethatisnotonline.
#clresourceenableApacheTomcat-resourceIfyoudeployedafailoverdataservice,switchtheApacheTomcatresourcegrouptoanotherclusternode,suchasnode2.
#clresourcegroupswitch-nnode2Apache-Tomcat-failover-resource-groupUnderstandingtheOracleSolarisClusterApacheTomcatHAParameterFileUsethisinformationtounderstandthecontentsoftheOracleSolarisClusterApacheTomcatHAparameterfile.
ThissectiondescribesthestructureandthecontentoftheOracleSolarisClusterApacheTomcatHAparameterfile,aswellasthestrategytochoosesomeofitsvariables.
StructureoftheApacheTomcatHAparameterfileApacheTomcatHAusesaparameterfiletopassparameterstothestart,stop,andprobecommand.
ThisparameterfileneedstobeavalidKornshellscriptwhichsetsseveralvariables.
ThestructureofthisfileappearsinTable1–7.
Forexamplesoftheparameterfilereferto"RegisteringandConfiguringOracleSolarisClusterHAforApacheTomcat"onpage32.
TABLE1–7StructureoftheApacheTomcatHAParameterFileVariableExplanationEnvScriptThisisakshscriptoracshscript,dependingonthelogin-shelloftheusernamethatownsApacheTomcat.
ThepurposeofthisscriptistosettheApacheTomcatspecificenvironmentvariables,whichareneededtostartandstoptheApacheTomcatinstance.
UserTheowneroftheApacheTomcatinstance.
123UnderstandingtheOracleSolarisClusterApacheTomcatHAParameterFileOracleSolarisClusterDataServiceforApacheTomcatGuideMarch2012,E26824–0146TABLE1–7StructureoftheApacheTomcatHAParameterFile(Continued)VariableExplanationBasepathBasepathistheabsolutepathnametothedirectorywheretheTomcatbindirectoryresides.
Typically,itisCATALINA_HOMEfor5.
xor6.
x.
HostTheHostvariableistheHosttotestthefunctionalityoftheApacheTomcatserverprocess.
TheTestisdoneviaaconnectiontoHost:Port.
PortAPortwhereApacheTomcatisserving.
ThisPortisusedtogetherwiththeHosttotestthefunctionalityoftheApacheTomcatserverprocess.
TestCmdThisvariablerepresentsthecommandthatispassedtotheApacheTomcatserverprocesstotestitssanity.
ReturnStringThevariableReturnStringrepresentsthestringthatmustbepresentintheanswertotheTestCmd.
ItcannotbeConnectionrefusedbecausethisstringisintheanswerwhentheApacheTomcatserverprocessisnotrunning.
StartwaitThisvariablerepresentsthenumberofsecondstowaitaftertheApacheTomcatstartcommandiscompleted.
ItlastsuntiltheApacheTomcatserverprocessisfullyoperational.
Theabsolutenumberofsecondsdependsonthespeedandtheloadofthehardware.
Agoodstrategyistostartwith10-20seconds.
TestUrlThisvariablepresentsacompletehttporhttpsURL,whichispassedtothewgetcommandtotesttheTomcatserver'ssanity.
WgetPathThisvariablepresentstheabsolutepathtothewgetbinary,ifthewgetbinaryisnotlocatedunder/usr/sfw/bin/wget.
TheparametersinTable1–7canbechangedatanytime.
Theonlydifferenceiswhenchangestakeeffect.
ThefollowingparametersoftheApacheTomcatHAparameterfileareusedforstartingandstoppingApacheTomcat.
ChangestotheseparameterstakeeffectateveryrestartordisablingandenablingofanApacheTomcatresource.
EnvScriptUserBasepathStartwaitTestUrlWgetPathThefollowingparametersoftheApacheTomcatHAparameterfileareusedwithinthefaultmonitor.
ChangestotheseparameterstakeeffectateveryThorough_probe_interval.
HostPortUnderstandingtheOracleSolarisClusterApacheTomcatHAParameterFileChapter1InstallingandConfiguringOracleSolarisClusterHAforApacheTomcat47TestCmdReturnStringStrategytoChoosetheTestCmdandtheReturnStringVariableThefollowingalternativesareavailabletochoosetheReturnStringvariable:TakethestartpageofyourapplicationandsettheTestCmdtoget/start_page.
Ifyoupickedthewgetprobemethod,setTestUrltohttp://ipalias:port/start_page.
Withthisstrategy,youaremonitoringthatApacheTomcatisservingyourapplication.
TaketheApacheTomcatdefaultstartpageandsettheTestCmdtoget/default-startpage.
Ifyoupickedthewgetmethod,setTestUrltohttp://ipalias:port/default-startpage.
Inthiscase,settheReturnStringtoastringcontainedinthestartpage.
ThisstringdependsonthedeployedApacheTomcatversion;for5.
xand6.
xitisCATALINA.
Withthisstrategy,youaremonitoringthatApacheTomcatisservingitsdefaultapplication.
Deployatestapplication(whichisnotprovidedwiththeHAforApacheTomcatagent)toApacheTomcat.
SettheTestCmdtogetstartpage_of_the_application.
Ifyouusethewgetmethod,setTestUrltohttp://ipalias:port/startpage_of_the_application.
Inthiscase,settheReturnStringtoastringcontainedinthestartpage.
Withthisstrategy,youaremonitoringthatApacheTomcatisservingyourtestapplication.
Ifnoneoftheaboveisappropriate,settheTestCmdtoget/a-page-which-does-not-exists.
Inthiscase,settheReturnStringtoastringcontainedintheErrorPage.
Withthisstrategy,youaremonitoringthatApacheTomcatisoperational,becauseitregistersthatitmustdeliverapagethatdoesnotexist.
Youcanevaluatethedifferentpagesbyconnectingusingabrowserwithhostname:portandspecifyingthedifferentpages.
UnderstandingOracleSolarisClusterHAforApacheTomcatFaultMonitorThissectiondescribestheOracleSolarisClusterHAforApacheTomcatfaultmonitor'sprobingalgorithmandfunctionality,aswellastheconditions,messages,andrecoveryactionsassociatedwithunsuccessfulprobing.
Forconceptualinformationonfaultmonitors,seeOracleSolarisClusterConceptsGuide.
UnderstandingOracleSolarisClusterHAforApacheTomcatFaultMonitorOracleSolarisClusterDataServiceforApacheTomcatGuideMarch2012,E26824–0148ResourcePropertiesTheOracleSolarisClusterHAforApacheTomcatfaultmonitorusesthesameresourcepropertiesastheresourcetypeSUNW.
gds.
RefertotheSUNW.
gds(5)manpageforacompletelistofresourceproperties.
ProbingAlgorithmandFunctionalityThefollowingstepsareexecutedtomonitorthesanityofApacheTomcat.
1.
SleepsforThorough_probe_interval.
2.
PingstheHost,whichisconfiguredintheApacheTomcatHAparameterfileunlesstheTestUrlparameterisspecifiedintheTomcatparameterfile.
3.
ConnectstotheApacheTomcatviaHostandPort.
Iftheconnectionissuccessful,itsendstheTestCmdandtestswhethertheReturnStringcomesback.
Ifitfails,itisrescheduledafterfiveseconds.
Ifthisfailsagain,theproberestartstheApacheTomcat.
Caution–TheReturnStringcannotbeConnectionrefusedbecausethisstringisreturnedifnoconnectionispossible.
4.
IftheApacheTomcatprocesshasdied,pmfwillinterrupttheprobetoimmediatelyrestarttheApacheTomcat.
5.
IftheApacheTomcatisrepeatedlyrestartedandsubsequentlyexhauststheRetry_countwithintheRetry_interval,thenafailoverisinitiatedfortheresourcegroupontoanothernode.
ThisisdoneiftheresourcepropertyFailover_enabledissettoTRUE.
DebuggingHAforApacheTomcatHAforApacheTomcathasafilenamedconfigthatenablesyoutoactivatedebuggingforApacheTomcatresources.
Thisfileisinthe/opt/SUNWsctomcat/etcdirectory.
HowtoActivateDebuggingforHAforApacheTomcatDeterminewhetheryouareinaglobalzoneorinafailoverzoneconfiguration.
IfyouroperatingsystemisOracleSolaris11andyourApacheTomcatresourceisdependentonaSolarisZonebootcomponentresource,youareinafailoverzoneconfiguration.
1DebuggingHAforApacheTomcatChapter1InstallingandConfiguringOracleSolarisClusterHAforApacheTomcat49DeterminewhetherdebuggingforHAforApacheTomcatisactive.
#grepdaemon/etc/syslog.
conf*.
err;kern.
debug;daemon.
notice;mail.
crit/var/adm/messages*.
alert;kern.
err;daemon.
erroperator#Ifdebuggingisinactive,daemon.
noticeissetinthe/etc/syslog.
conffileoftheappropriatezone.
Ifdebuggingisinactive,editthe/etc/syslog.
conffileintheappropriatezonetochangedaemon.
noticetodaemon.
debug.
ConfirmthatdebuggingforHAforApacheTomcatisactive.
Ifdebuggingisactive,daemon.
debugissetinthe/etc/syslog.
conffile.
#grepdaemon/etc/syslog.
conf*.
err;kern.
debug;daemon.
debug;mail.
crit/var/adm/messages*.
alert;kern.
err;daemon.
erroperator#Restartthesyslogddaemonintheappropriatezone.
#svcadmrefreshsvc:/system/system-log:defaultEditthe/opt/SUNWsczone/sczbt/etc/configfiletochangetheDEBUG=variableaccordingtooneoftheexamples:DEBUG=ALLDEBUG=resourcenameDEBUG=resourcename,resourcename,.
.
.
#cat/opt/SUNWsctomcat/etc/config##Copyright2006,2012,Oracleand/oritsaffiliates.
Allrightsreserved.
##Usage:#DEBUG=orALL#DEBUG=ALL#Note–Todeactivatedebugging,repeatsteps1–6,changingdaemon.
debugtodaemon.
noticeandchangingtheDEBUGvariabletoDEBUG=.
23456DebuggingHAforApacheTomcatOracleSolarisClusterDataServiceforApacheTomcatGuideMarch2012,E26824–0150DeploymentExample:InstallingApacheTomcatintheGlobalZoneThisappendixpresentsacompleteexampleofhowtoinstallandconfiguretheApacheTomcatapplicationanddataserviceintheglobalzone.
Itpresentsasimpletwo-nodeclusterconfiguration.
Ifyouneedtoinstalltheapplicationinanyotherconfiguration,refertothegeneral-purposeprocedurespresentedelsewhereinthismanual.
ForanexampleofApacheTomcatinstallationinafailoverzone,seeAppendixB,"DeploymentExample:InstallingApacheTomcatinaFailoverZone.
"TargetClusterConfigurationThisexampleusesatwo-nodeclusterwiththefollowingnodenames:phys-schost-1(aphysicalnode,whichownsthefilesystem)phys-schost-2(aphysicalnode)Thisconfigurationalsousesthelogicalhostnameha-host-1.
SoftwareConfigurationThisdeploymentexampleusesthefollowingsoftwareproductsandversions:OracleSolaris11softwareforSPARCorx86platformsOracleSolarisCluster4.
0coresoftwareHAforApacheTomcatAminimumofApacheTomcatversion5.
5.
17Thewgetbinaryisavailableunder/usr/sfw/bin/wget.
YourpreferredtexteditorThisexampleassumesthatyouhavealreadyinstalledandestablishedyourcluster.
Itillustratesinstallationandconfigurationofthedataserviceapplicationonly.
AAPPENDIXA51AssumptionsTheinstructionsinthisexampleweredevelopedwiththefollowingassumptions:Shellenvironment:AllcommandsandtheenvironmentsetupinthisexamplearefortheKornshellenvironment.
Ifyouuseadifferentshell,replaceanyKornshell-specificinformationorinstructionswiththeappropriateinformationforyoupreferredshellenvironment.
Userlogin:Unlessotherwisespecified,performallproceduresassuperuserorassumearolethatprovidessolaris.
cluster.
admin,solaris.
cluster.
modify,andsolaris.
cluster.
readRBACauthorization.
InstallingandConfiguringApacheTomcatonGlobalStorageintheGlobalZoneThetasksyoumustperformtoinstallandconfigureApacheTomcatintheglobalzoneareasfollows:"Example:PreparingtheClusterforApacheTomcat"onpage52"Example:ConfiguringClusterResourcesforApacheTomcat"onpage53"Example:InstallingtheApacheTomcatSoftwareonSharedStorage"onpage53"Example:ModifyingtheApacheTomcatConfigurationFiles"onpage54"Example:EnablingtheApacheTomcatSoftwaretoRunintheCluster"onpage55Example:PreparingtheClusterforApacheTomcatInstallandconfiguretheclusterasinstructedinOracleSolarisClusterSoftwareInstallationGuide.
Installthefollowingclustersoftwarecomponentsonbothnodes.
OracleSolarisClustercoresoftwareOracleSolarisClusterdataserviceforApacheTomcatBeginningonthenodethatownsthefilesystem,addthetomcatuser.
phys-schost-1#groupadd-g1000tomcatphys-schost-2#groupadd-g1000tomcatphys-schost-1#useradd-g1000-d/global/mnt3/tomcat-m-s/bin/kshtomcatphys-schost-2#useradd-g1000-d/global/mnt3/tomcat-m-s/bin/kshtomcat12AssumptionsOracleSolarisClusterDataServiceforApacheTomcatGuideMarch2012,E26824–0152Example:ConfiguringClusterResourcesforApacheTomcatRegisterthenecessarydatatypesonbothnodes.
phys-schost-1#clresourcetyperegisterSUNW.
gdsSUNW.
HAStoragePlusCreatetheApacheTomcatresourcegroup.
phys-schost-1#clresourcegroupcreateRG-TOMCreatethelogicalhost.
phys-schost-1#clreslogicalhostnamecreate-gRG-TOMha-host-1CreatetheHAStoragePlusresourceintheRG-TOMresourcegroup.
phys-schost-1#clresourcecreate-gRG-TOM-tSUNW.
HAStoragePlus-pAffinityOn=TRUE\-pFilesystemMountPoints=/global/mnt3,/global/mnt4RS-TOM-HASEnabletheresourcegroup.
phys-schost-1#clresourcegrouponline-emMRG-TOMExample:InstallingtheApacheTomcatSoftwareonSharedStorageThesestepsillustratehowtoinstalltheApacheTomcatsoftwareinthedirectory/global/mnt3/tomcat.
Aslongasonlyonenodeismentioneditneedstobethenodewhereyourresourcegroupisonline.
InstalltheApacheTomcatbinaries.
phys-schost-1#su-tomcatphys-schost-1#gzcatapache-tomcat-5.
5.
17.
tar.
gz|tarxvf-phys-schost-1#gzcatapache-tomcat-5.
5.
17-compat.
tar.
gz|tarxvf-Createyourenvironmentscript/global/mnt3/tomcat/env.
kshwiththefollowingcontents.
catenv.
ksh#!
/usr/bin/kshJAVA_HOME=/usr/j2seCATALINA_HOME=/global/mnt3/tomcat/apache-tomcat-5.
5.
17exportJAVA_HOMECATALINA_HOME1234512InstallingandConfiguringApacheTomcatonGlobalStorageintheGlobalZoneAppendixADeploymentExample:InstallingApacheTomcatintheGlobalZone53Example:ModifyingtheApacheTomcatConfigurationFilesCopytheApacheTomcatconfigurationfilefromtheagentdirectorytoitsdeploymentlocation.
phys-schost-1#cp/opt/SUNWsctomcat/util/sctomcat_config/global/mnt3phys-schost-1#cp/opt/SUNWsctomcat/bin/pfile/global/mnt3phys-schost-1#chowntomcat:tomcat/global/mnt3/pfileAddthiscluster'sinformationtothesctomcat_configconfigurationfile.
Thefollowinglistingshowstherelevantfileentriesandthevaluestoassigntoeachentry.
.
.
.
RS=RS-TOMRG=RG-TOMPORT=8080LH=ha-host-1NETWORK=trueSCALABLE=falsePFILE=/global/mnt3/pfileHAS_RS=RS-TOM-HASSaveandclosethefile.
Addthiscluster'sinformationtotheparameterfile/global/mnt3/pfile.
Thefollowinglistingshowstherelevantfileentriesandthevaluestoassigntoeachentry.
EnvScript=/global/mnt3/tomcat/env.
kshUser=tomcatBasepath=/global/mnt3/tomcat/apache-tomcat-5.
5.
17Host=ha-host-1Port=8080TestCmd="get/index.
jsp"ReturnString="CATALINA"Startwait=20Asanalternative,youcanusethefollowingsetofvariables:EnvScript=/global/mnt3/tomcat/env.
kshUser=tomcatBasepath=/global/mnt3/tomcat/apache-tomcat-5.
5.
17TestUrl="http://ha-host-1:8080/"ReturnString="CATALINA"Startwait=20Saveandclosethefile.
12345InstallingandConfiguringApacheTomcatonGlobalStorageintheGlobalZoneOracleSolarisClusterDataServiceforApacheTomcatGuideMarch2012,E26824–0154Example:EnablingtheApacheTomcatSoftwaretoRunintheClusterRunthesctomcat_registerscripttoregistertheresource.
phys-schost-1#ksh/opt/SUNWsctomcat/util/sctomcat_register\-f/global/mnt3/sctomcat_configEnabletheresource.
phys-schost-1#clresourceenableRS-TOM12InstallingandConfiguringApacheTomcatonGlobalStorageintheGlobalZoneAppendixADeploymentExample:InstallingApacheTomcatintheGlobalZone5556DeploymentExample:InstallingApacheTomcatinaFailoverZoneThisappendixpresentsacompleteexampleofhowtoinstallandconfiguretheApacheTomcatapplicationanddataserviceinafailoverzone.
Itpresentsasimpletwo-nodeclusterconfiguration.
Ifyouneedtoinstalltheapplicationinanyotherconfiguration,refertothegeneral-purposeprocedurespresentedelsewhereinthismanual.
ForanexampleofApacheTomcatinstallationinaglobalzone,seeAppendixA,"DeploymentExample:InstallingApacheTomcatintheGlobalZone.
"TargetClusterConfigurationThisexampleusesatwo-nodeclusterwiththefollowingnodenames:phys-schost-1–Aphysicalnode,whichownsthefilesystemphys-schost-2–Aphysicalnodesolarisfz1–ThezonetobefailedoverSoftwareConfigurationThisdeploymentexampleusesthefollowingsoftwareproductsandversions:OracleSolaris11softwareforSPARCorx86platformsOracleSolarisCluster4.
0coresoftwareHAforApacheTomcatOracleSolarisClusterHAforZonesAminimumofApacheTomcatversion5.
5.
17Thewgetbinaryisavailableunder/usr/sfw/bin/wget.
YourpreferredtexteditorZFSistheonlysupportedfilesystemforafailoverzoneinSolaris11.
Thisexampleassumesthatyouhavealreadyinstalledandestablishedyourcluster.
Theexampleillustratesinstallationandconfigurationofthedataserviceapplicationonly.
BAPPENDIXB57AssumptionsTheinstructionsinthisexampleweredevelopedwiththefollowingassumptions:Shellenvironment:AllcommandsandtheenvironmentsetupinthisexamplearefortheKornshellenvironment.
Ifyouuseadifferentshell,replaceanyKornshell-specificinformationorinstructionswiththeappropriateinformationforyoupreferredshellenvironment.
Userlogin:Unlessotherwisespecified,performallproceduresassuperuserorassumearolethatprovidessolaris.
cluster.
admin,solaris.
cluster.
modify,andsolaris.
cluster.
readRBACauthorization.
InstallingandConfiguringApacheTomcatonGlobalStorageintheFailoverZoneThetasksyoumustperformtoinstallandconfigureApacheTomcatinthefailoverzoneareasfollows:"Example:PreparingtheClusterforApacheTomcat"onpage58"Example:ConfiguringClusterResourcesforApacheTomcat"onpage58"Example:CreatingandConfiguringtheFailoverZone"onpage59"Example:InstallingtheApacheTomcatSoftwareonSharedStorage"onpage63"Example:ModifyingtheApacheTomcatConfigurationFiles"onpage64"EnablingtheApacheTomcatSoftwaretoRunintheCluster"onpage65Example:PreparingtheClusterforApacheTomcatInstallandconfiguretheclusterasinstructedinOracleSolarisClusterSoftwareInstallationGuide.
Installthefollowingclustersoftwarecomponentsonbothnodes.
OracleSolarisClustercoresoftwareOracleSolarisClusterdataserviceforApacheTomcatOracleSolarisClusterdataserviceforSolarisZonesExample:ConfiguringClusterResourcesforApacheTomcatRegisterthenecessaryresourcetypes.
phys-schost-1#clresourcetyperegisterSUNW.
gdsSUNW.
HAStoragePlus1AssumptionsOracleSolarisClusterDataServiceforApacheTomcatGuideMarch2012,E26824–0158Createthefailoverresourcegroup.
phys-schost-1#clresourcegroupcreatezone-rgCreateazpoolonashareddisktohostthezonepathforthefailoverzone.
phys-schost-1#zpoolcreate-m/ha-zonesha-zones\/dev/rdsk/c0t60080E500017B52C00002B9D4EB40DB5d0phys-schost-1#zpoolexportha-zonesInafailoverconfiguration,thezone'szonepathmustbeonahighlyavailablefilesystem.
RegisterthezpoolwiththeHAStoragePlusresourceandcreatearesource(oftypeHASP)forthezones'diskstorage(thezpool).
phys-schost-1#clresourcecreate-gzone-rg-tSUNW.
HAStoragePlus-p\zpools=ha-zonesha-zones-hasp-rsphys-schost-1#clresourcegrouponline-emM-nphys-schost-1zone-rgphys-schost-1#zfscreateha-zones/solarisExample:CreatingandConfiguringtheFailoverZoneCreateandconfigurethezoneonallnodesthatcanhostthisfailoverzone.
Thezpoolhostingthezonepathmustbeonashareddisk.
Foratwo-nodecluster,thezoneconfigurationmustbeexecutedonbothnodes.
Followingisanexampleusingthephys-schost-1node.
Performthesameactionsonthephys-schost-2node.
phys-schost-1#zonecfg-zsolarisfz1\'create-b;setzonepath=/ha-zones/solaris/solarisfz1;setautoboot=false;setip-type=shared;addattr;setname=osc-ha-zone;settype=boolean;setvalue=true;end;addnet;setaddress=zone-hostname;setphysical=sc_ipmp0;end;'Verifythatthenodeisconfiguredonbothnodes.
phys-schost-1#zoneadmlist-cvIDNAMESTATUSPATHBRANDIP0globalrunning/solarisshared-solarisfz1configured/ha-zones/solaris/solarisfz1solarissharedphys-schost-2#zoneadmlist-cvIDNAMESTATUSPATHBRANDIP0globalrunning/solarisshared-solarisfz1configured/ha-zones/solaris/solarisfz1solarissharedInstallthezoneonphys-schost-1,whichiswheretheha-zoneszpoolisonline.
phys-schost-1:~#zoneadm-zsolarisfz1installProgressbeingloggedto/var/log/zones/zoneadm.
20030401T184050Z.
solarisfz1.
installImage:Preparingat/ha-zones/solaris/solarisfz1/root.
InstallLog:/system/volatile/install.
3349/install_logAIManifest:/tmp/manifest.
xml.
QGa4GgSCProfile:/usr/share/auto_install/sc_profiles/enable_sci.
xml234123InstallingandConfiguringApacheTomcatonGlobalStorageintheFailoverZoneAppendixBDeploymentExample:InstallingApacheTomcatinaFailoverZone59Zonename:solarisfz1Installation:Starting.
.
.
CreatingIPSimageInstallingpackagesfrom:solarisorigin:http://pkg.
oracle.
com/solaris/release/ha-clusterorigin:http://localhost:1008/ha-cluster/2c76b8fe7512dde39\c04c11f28f6be4603f39c66/DOWNLOADPKGSFILESXFER(MB)Completed167/16732062/32062175.
8/175.
8$PHASEACTIONSInstallPhase44313/44313PHASEITEMSPackageStateUpdatePhase167/167ImageStateUpdatePhase2/2Installation:SucceededNote:Manpagescanbeobtainedbyinstallingpkg:/system/manual.
Done.
Done:Installationcompletedin550.
217seconds.
NextSteps:Bootthezone,thenlogintothezoneconsole(zlogin-C)tocompletetheconfigurationprocess.
Logsavedas/ha-zones/solaris/solarisfz1/root/var/log/zones/zoneadm.
20030401T184050Z.
solarisfz1.
install.
Verifythatthezonewassuccessfullyinstalledandcanbootuponphys-schost-1.
a.
Verifythatthezonewasinstalled.
phys-schost-1#zoneadmlist-cvIDNAMESTATUSPATHBRANDIP0globalrunning/solarisshared-solarisfz1installed/ha-zones/solaris/solarisfz1solarissharedb.
Inadifferentwindow(forexample,fromanssh,rlogin,ortelnetwindow),logintothezone'sconsoleandbootthezone.
phys-schost-1#zlogin-Csolarisfz1phys-schost-1#zoneadm-zsolarisfz1bootc.
Followthepromptsintheinteractivescreenstoconfigurethezone.
d.
Shutdownthezoneandswitchtheresourcegrouptoanothernodeintheresourcegroupnodelist.
phys-schost-1#zoneadm-zsolarisfz1shutdownphys-schost-1#clresourcegroupswitch-nphys-schost-2zone-rgphys-schost-1#zoneadm-zsolarisfz1detach-Fphys-schost-1#zoneadmlist-cvIDNAMESTATUSPATHBRANDIP0globalrunning/solarisshared-solarisfz1configured/ha-zones/solaris/solarisfz1solarisshared4InstallingandConfiguringApacheTomcatonGlobalStorageintheFailoverZoneOracleSolarisClusterDataServiceforApacheTomcatGuideMarch2012,E26824–0160Assigntheuniversallyuniqueidentifier(UUID)fortheactivebootenvironment(BE)fromthefirstnode,phys-schost-1,totheactiveBEonthesecondnode,phys-schost-2.
a.
GettheUUIDfortheactiveBEonphys-schost-1.
phys-schost-1:~#beadmlist-Hb175b-fresh;70db96a2-5006-c84e-da77-f8bd430ba914;;;64512;static;1319658138s11_175b;b5d7b547-180d-467e-b2c4-87499cfc1e9d;NR;/;8000659456;static;1319650094s11_175b-backup-1;aba7a813-feb9-e880-8d7b-9d0e5bcd09af;;;166912;static;1319658479phys-schost-2:~#beadmlist-Hb175b-fresh;c37d524b-734a-c1e2-91d9-cf460c94110e;;;65536;static;1319471410s11_175b;1d0cca6d-8599-e54a-8afa-beb518b1d87a;NR;/;8096948224;static;1319293680s11_175b-backup-1;db2b581a-ea82-6e8c-9a3d-c1b385388fb7;;;167936;static;1319472971b.
SettheUUIDfortheactiveBEoftheglobalzoneonphys-schost-2tobethesameasphys-schost-1.
TheactiveBEhasflagNinthethirdfieldseparatedbyasemicolon.
TheUUIDissetonthedatasetoftheBE.
YoucangettheUUIDbyrunningdf-b/.
phys-schost-2:~#df-b/Filesystemavailrpool/ROOT/s11_175b131328596root@vzoolah3a:/#phys-schost-2:~#zfssetorg.
opensolaris.
libbe:uuid=b5d7b547-180d-467e-b2c4\-87499cfc1e9d\rpool/ROOT/s11_175bAttachthezoneandverifythezonecanbootonthesecondnode.
a.
Attachthezone.
phys-schost-2#zoneadm-zsolarisfz1attach-Fb.
Fromanothersession,connecttothezoneconsole.
phys-schost-2#zlogin-Csolarisfz1c.
Bootthezoneandobservethebootmessagesontheconsole.
phys-schost-2#zoneadm-zsolarisfz1bootIfthebootupsucceeded,shutdownanddetachthezone.
phys-schost-2#zoneadm-zsolarisfz1shutdownphys-schost-2#zoneadm-zsolarisfz1detach-FOnbothnodes,installthefailovercontaineragentifitisnotalreadyinstalled.
Thefollowingexampleshowshowtoinstalltheagentonphys-schost-1.
phys-schost-1#pkginstallha-cluster/data-service/ha-zones5678InstallingandConfiguringApacheTomcatonGlobalStorageintheFailoverZoneAppendixBDeploymentExample:InstallingApacheTomcatinaFailoverZone61Createtheresourcefromanyonenodeandsettheparametersonbothnodes.
Stepsaandbshowthesestepsperformedonphys-schost-1.
a.
Registertheresourcephys-schost-1#clresourcetyperegisterSUNW.
gdsb.
Onbothnodes,editthesczbt_configfileandsettheparameters.
phys-schost-1#cd/opt/SUNWsczone/sczbt/utilphys-schost-1#cp-psczbt_configsczbt_config.
solarisfz1-rsphys-schost-1#visczbt_config.
solarisfz1-rsRS=solarisfz1-rsRG=zone-rgPARAMETERDIR=/ha-zones/solaris/solarisfz1/paramsSC_NETWORK=falseSC_LH=FAILOVER=trueHAS_RS=ha-zones-hasp-rsZonename="solarisfz1"Zonebrand="solaris"Zonebootopt=""Milestone="svc:/milestone/multi-user-server"LXrunlevel="3"SLrunlevel="3"Mounts=""c.
Onphys-schost-2,createtheparamsdirectorythatappearsinthesczbt_configfile.
phys-schost-2#mkdir/ha-zones/solaris/solarisfz1/paramsd.
Ononenode,configurethezone-bootresource.
Theresourceisconfiguredwiththeparametersthatyousetinthesczbt_configfile.
phys-schost-2#.
/sczbt_register-f.
/sczbt_config.
solarisfz1-rse.
Ononenode,enablethefailoverzoneresourcethatwascreated.
phys-schost-2#clresourceenablesolarisfz1-rsf.
Ononenode,checkthestatusoftheresourcegroupsandresources.
phys-schost-2#clresourcestatus-gzone-rg===ClusterResources===ResourceNameNodeNameStateStatusMessagesolarisfz1-rsphys-schost-1OfflineOfflinephys-schost-2OnlineOnlineha-zones-hasp-rsphys-schost-1OfflineOfflinephys-schost-2OnlineOnlineg.
Verifythatthezonesuccessfullybootsupandthenswitchtotheothernodetotesttheswitchovercapability.
phys-schost-2#clresourcegroupswitch-nphys-schost-1zone-rgphys-schost-2#clresourcestatus-gzone-rg9InstallingandConfiguringApacheTomcatonGlobalStorageintheFailoverZoneOracleSolarisClusterDataServiceforApacheTomcatGuideMarch2012,E26824–0162===ClusterResources===ResourceNameNodeNameStateStatusMessagesolarisfz1-rsphys-schost-1OnlineOnlinephys-schost-2OfflineOfflineha-zones-hasp-rsphys-schost-1OnlineOnlinephys-schost-2OfflineOfflineh.
Verifythatthezonesuccessfullyswitchedovertotheothernode.
phys-schost-1#zlogin-Csolarisfz1Example:InstallingtheApacheTomcatSoftwareonSharedStorageThesestepsillustratehowtoinstalltheApacheTomcatsoftwareinthedirectory/tomcat.
Aslongasonlyonenodeismentioneditneedstobethenodewhereyourresourcegroupisonline.
Logintothezone.
phys-schost-1#zloginsolarisfz1Addthetomcatgroupanduser.
zone#groupadd-g1000tomcatzone#useradd-g1000-d/tomcat-m-s/bin/kshtomcatInstalltheApacheTomcatbinaries.
zone#su-tomcatzone#gzcatapache-tomcat-5.
5.
17.
tar.
gz|tarxvf-zone#gzcatapache-tomcat-5.
5.
17-compat.
tar.
gz|tarxvf-Createyourenvironmentscript/tomcat/env.
kshwiththefollowingcontents.
zone#catenv.
ksh#!
/usr/bin/kshJAVA_HOMME=/usr/j2seCATALINA_HOME=/tomcat/apache-tomcat-5.
5.
17exportJAVA_HOMECATALINA_HOMECopytheApacheTomcatconfigurationfilefromtheagentdirectorytoitsdeploymentlocation.
zone#cp/opt/SUNWsctomcat/bin/pfile/tomcatzone#chowntomcat:tomcat/tomcat/pfileAddthiscluster'sinformationtotheparameterfile/tomcat/pfile.
Thefollowinglistingshowstherelevantfileentriesandthevaluestoassigntoeachentry.
EnvScript=/tomcat/env.
kshUser=tomcatBasepath=/tomcat/apache-tomcat-5.
5.
17123456InstallingandConfiguringApacheTomcatonGlobalStorageintheFailoverZoneAppendixBDeploymentExample:InstallingApacheTomcatinaFailoverZone63Host=zone-hostnamePort=8080TestCmd="get/index.
jsp"ReturnString="CATALINA"Startwait=20Asanalternative,youcanusethefollowingsetofvariables:EnvScript=/global/mnt3/tomcat/env.
kshUser=tomcatBasepath=/global/mnt3/tomcat/apache-tomcat-5.
5.
17TestUrl="http://ha-host-1:8080/"ReturnString="CATALINA"Startwait=20Saveandclosethefile.
Leavethezone.
Example:ModifyingtheApacheTomcatConfigurationFilesEnsurethattheApacheTomcatdataservicepackagewasinstalled.
CopytheApacheTomcatconfigurationfilefromtheagentdirectorytoitsdeploymentlocation.
phys-schost-1#cp/opt/SUNWsctomcat/util/sctomcat_config/global/mnt3Addthiscluster'sinformationtothesctomcat_configconfigurationfile.
Thefollowinglistingshowstherelevantfileentriesandthevaluestoassigntoeachentry.
RS=RS-TOMRG=zone-rgPORT=8080LH=zone-hostnameNETWORK=trueSCALABLE=falsePFILE=/tomcat/pfileHAS_RS=ha-zones-hasp-rsZONE=solarisfz1ZONE_BT=solarisfz1-rsPROJECT=Saveandclosethefile.
781234InstallingandConfiguringApacheTomcatonGlobalStorageintheFailoverZoneOracleSolarisClusterDataServiceforApacheTomcatGuideMarch2012,E26824–0164EnablingtheApacheTomcatSoftwaretoRunintheClusterRunthesctomcat_registerscripttoregistertheresource.
phys-schost-1#ksh/opt/SUNWsctomcat/util/sctomcat_register\-f/global/mnt3/sctomcat_configEnabletheresource.
phys-schost-1#clresourceenableRS-TOM12InstallingandConfiguringApacheTomcatonGlobalStorageintheFailoverZoneAppendixBDeploymentExample:InstallingApacheTomcatinaFailoverZone6566IndexCcommandsclresourcecreate,21clresourceenable,35clresourcestatus,35clresourcegroupcreate,21clresourcegrouponline,22,26clresourcegroupswitch,46clresourcetyperegister,21cluster,46groupadd,24,28shutdown.
sh,30startup.
sh,30su,24,28useradd,24,28configurationsfailoverconfiguration,17multiplemasterconfiguration,15multiplemastersconfiguration,14scalableconfiguration,14Ddebugging,HAforApacheTomcat,49–50dependencies,17deploymentexamplesApacheTomcatinthefailoverzone,57–65ApacheTomcatintheglobalzone,51–55Eenableresourcegroup,23enableTomcatresource,35,39,43enablingresourcegroup,27environmentscripts,25,29examplesApacheTomcatinthefailoverzone,57–65ApacheTomcatintheglobalzone,51–55Ffaultmonitor,48–49HHAforApacheTomcatdebugging,49–50installing,31–32softwarepackage,installing,31–32help,10Iinstall,24–26,27–29installing,HAforApacheTomcat,31–32Lload_balancing_policy,1567OOracleSolaris,publisher,31OracleSolarisCluster,publisher,31Ppackage,31–32parameterfile,32,36,39,46–48pfileSeeparameterfileprobing,49publisherOracleSolaris,31OracleSolarisCluster,31Rregister,34,37,41registrationfiles,19registrationscripts,34,37,41requirements,16–20resourcegroup,enabling,27ResourceTypes,SUNW.
gds,21resources,ApacheTomcatapplicationdebugging,49–50restrictions,15–16Sscalability,13–15softwarepackage,31–32strategy,48Ttechnicalsupport,10IndexOracleSolarisClusterDataServiceforApacheTomcatGuideMarch2012,E26824–0168

VPSMS:53元/月KVM-512MB/15G SSD/1TB/洛杉矶CN2 GIA

VPSMS最近在做两周年活动,加上双十一也不久了,商家针对美国洛杉矶CN2 GIA线路VPS主机提供月付6.8折,季付6.2折优惠码,同时活动期间充值800元送150元。这是一家由港人和国人合资开办的VPS主机商,提供基于KVM架构的VPS主机,美国洛杉矶安畅的机器,线路方面电信联通CN2 GIA,移动直连,国内访问速度不错。下面分享几款VPS主机配置信息。CPU:1core内存:512MB硬盘:...

JustHost,最新高性价比超便宜俄罗斯CN2 VPS云服务器终身8折优惠,最低仅8元/月起,200Mbps带宽不限流量,五大机房自助自由切换,免费更换IP,俄罗斯cn2vps怎么样,justhost云服务器速度及综合性能详细测评报告

主机参考最新消息:JustHost怎么样?JustHost服务器好不好?JustHost好不好?JustHost是一家成立于2006年的俄罗斯服务器提供商,支持支付宝付款,服务器价格便宜,200Mbps大带宽不限流量,支持免费更换5次IP,支持控制面板自由切换机房,目前JustHost有俄罗斯5个机房可以自由切换选择,最重要的还是价格真的特别便宜,最低只需要87卢布/月,约8.5元/月起!just...

Pacificrack:新增三款超级秒杀套餐/洛杉矶QN机房/1Gbps月流量1TB/年付仅7美刀

PacificRack最近促销上瘾了,活动频繁,接二连三的追加便宜VPS秒杀,PacificRack在 7月中下旬已经推出了五款秒杀VPS套餐,现在商家又新增了三款更便宜的特价套餐,年付低至7.2美元,这已经是本月第三波促销,带宽都是1Gbps。PacificRack 7月秒杀VPS整个系列都是PR-M,也就是魔方的后台管理。2G内存起步的支持Windows 7、10、Server 2003\20...

apachetomcat为你推荐
域名查询如何查询域名所有人的信息独立ip主机独立IP虚拟主机是什么?有哪些优势?域名注册网网站域名申请,在那备案?广东虚拟主机大家推荐一下广东地区稳定的IDCinfo域名注册淘宝上有的注册info域名十元左右,是不是真的网站服务器租用哪些网站适合租用独立服务器?ip代理地址IP代理什么意思?美国vps租用如何租用到最快的美国服务器重庆虚拟空间重庆那里可以租用VSP主机网站空间购买哪里买网站空间好?
成都主机租用 国外永久服务器 lunarpages 国外bt 正版win8.1升级win10 2017年黑色星期五 论坛空间 html空间 韩国网名大全 cpanel空间 个人域名 seednet 169邮箱 129邮箱 流媒体加速 双线机房 域名转入 cdn服务 tracker服务器 贵州电信 更多