Installing Oracle RAC 10g Release 2 on Linux x86.docx
《Installing Oracle RAC 10g Release 2 on Linux x86.docx》由会员分享,可在线阅读,更多相关《Installing Oracle RAC 10g Release 2 on Linux x86.docx(35页珍藏版)》请在冰豆网上搜索。
InstallingOracleRAC10gRelease2onLinuxx86
InstallingOracleRAC10gRelease2onLinuxx86
byJohnSmiley
LearnthebasicsofinstallingOracleRAC10gRelease2onRedHatEnterpriseLinuxorNovellSUSEEnterpriseLinux,fromthebaremetalup(forevaluationpurposesonly)
Contents
Overview
Background
PartI:
InstallLinux
PartII:
ConfigureLinuxforOracle
PartIII:
PreparetheSharedDisks
PartIV:
InstallOracleRACSoftware
Conclusion
Overview
Thisguideprovidesawalkthroughofinstalling anOracleDatabase10gRelease2RACdatabase oncommodityhardwareforthepurposeofevaluation. IfyouarenewtoLinuxand/orOracle,thisguideisforyou.ItstartswiththebasicsandwalksyouthroughaninstallationofOracleDatabase10gRelease2RACfromthebaremetalup.
Thisguidewilltaketheapproachofofferingtheeasiestpaths,withthefewestnumberofsteps,foraccomplishingatask.Thisapproachoftenmeansmakingconfigurationchoicesthatwouldbeinappropriateforanythingotherthananevaluation.Forthatreason,thisguideisnotappropriateforbuildingproduction-qualityenvironments,nordoesitreflectbestpractices.
ThethreeLinuxdistributionscertifiedforOracle 10gRelease2RACare:
∙RedHatEnterpriseLinux 4(RHEL4)
∙RedHatEnterpriseLinux3(RHEL3)
∙NovellSUSELinuxEnterpriseServer9
WewillcoverbothoftheLinux2.6kernel-baseddistributions:
RHEL4andSLES9. RHEL3isnotcoveredhere.
Thisguideisdividedintofourparts:
PartIcoverstheinstallationoftheLinuxoperatingsystem,PartIIcoversconfiguringLinuxforOracle,PartIIIdiscussestheessentialsofpartitioningshareddisk,andPartIVcoversinstallationoftheOraclesoftware.
ARelease1versionofthisguideisalsoavailable.
Background
TheillustrationbelowshowsthemajorcomponentsofanOracleRAC10gRelease2configuration.Nodesintheclusteraretypicallyseparateservers(hosts).
Hardware
Atthehardwarelevel,eachnodeinaRACclustersharesthreethings:
1.Accesstoshareddiskstorage
2.Connectiontoaprivatenetwork
3.Accesstoapublicnetwork.
SharedDiskStorage
OracleRACreliesonashareddiskarchitecture.Thedatabasefiles,onlineredologs,andcontrolfilesforthedatabasemustbeaccessibletoeachnodeinthecluster.TheshareddisksalsostoretheOracleClusterRegistryandVotingDisk(discussedlater).Thereareavarietyofwaystoconfiguresharedstorageincludingdirectattacheddisks(typicallySCSIovercopperorfiber),StorageAreaNetworks(SAN),andNetworkAttachedStorage(NAS).
PrivateNetwork
Eachclusternodeisconnectedtoallothernodesviaaprivatehigh-speednetwork,alsoknownastheclusterinterconnectorhigh-speedinterconnect(HSI).ThisnetworkisusedbyOracle'sCacheFusiontechnologytoeffectivelycombinethephysicalmemory(RAM)ineachhostintoasinglecache.OracleCacheFusionallowsdatastoredinthecacheofoneOracleinstancetobeaccessedbyanyotherinstancebytransferringitacrosstheprivatenetwork.Italsopreservesdataintegrityandcachecoherencybytransmittinglockingandothersynchronizationinformationacrossclusternodes.
TheprivatenetworkistypicallybuiltwithGigabitEthernet,butforhigh-volumeenvironments,manyvendorsofferproprietarylow-latency,high-bandwidthsolutionsspecificallydesignedforOracleRAC.LinuxalsooffersameansofbondingmultiplephysicalNICsintoasinglevirtualNIC(notcoveredhere)toprovideincreasedbandwidthandavailability.
PublicNetwork
Tomaintainhighavailability,eachclusternodeisassignedavirtualIPaddress(VIP).Intheeventofnodefailure,thefailednode'sIPaddresscanbereassignedtoasurvivingnodetoallowapplicationstocontinueaccessingthedatabasethroughthesameIPaddress.
ConfiguringtheClusterHardware
TherearemanydifferentwaystoconfigurethehardwareforanOracleRACcluster.OurconfigurationhereusestwoserverswithtwoCPUs,1GBRAM,twoGigabitEthernetNICs,adualchannelSCSIhostbusadapter(HBA),andeightSCSIdisksconnectedviacoppertoeachhost(fourdisksperchannel).ThediskswereconfiguredasJustaBunchOfDisks(JBOD)—thatis,withnohardwareRAIDcontroller.
Software
Atthesoftwarelevel,eachnodeinaRACclusterneeds:
1.Anoperatingsystem
2.OracleClusterware
3.OracleRACsoftware
4.AnOracleAutomaticStorageManagement(ASM)instance(optional).
OperatingSystem
OracleRACissupportedonmanydifferentoperatingsystems.ThisguidefocusesonLinux.TheoperatingsystemmustbeproperlyconfiguredfortheOS--includinginstallingthenecessarysoftwarepackages,settingkernelparameters,configuringthenetwork,establishinganaccountwiththepropersecurity,configuringdiskdevices,andcreatingdirectorystructures.All thesetasksaredescribedinthisguide.
OracleClusterReadyServicesbecomesOracleClusterware
OracleRAC10gRelease1introducedOracleClusterReadyServices(CRS),aplatform-independentsetofsystemservicesforclusterenvironments.InRelease2,OraclehasrenamedthisproducttoOracleClusterware.
Clusterwaremaintainstwofiles:
theOracleClusterRegistry(OCR)andtheVotingDisk.TheOCRandtheVotingDiskmustresideonshareddisksaseitherrawpartitionsorfilesinaclusterfilesystem.ThisguidedescribescreatingtheOCRandVotingDisksusingaclusterfilesystem(OCFS2)andwalksthroughtheCRSinstallation.
OracleRACSoftware
OracleRAC10gRelease2softwareistheheartoftheRACdatabaseandmustbeinstalledoneachclusternode.Fortunately,theOracleUniversalInstaller(OUI)doesmostoftheworkofinstallingtheRACsoftwareoneachnode.YouonlyhavetoinstallRACononenode—OUIdoestherest.
OracleAutomaticStorageManagement(ASM)
ASMisanewfeatureinOracleDatabase10gthatprovidestheservicesofafilesystem,logicalvolumemanager,andsoftwareRAIDinaplatform-independentmanner.OracleASMcanstripeandmirroryourdisks,allowdiskstobeaddedorremovedwhilethedatabaseisunderload,andautomaticallybalanceI/Otoremove"hotspots."ItalsosupportsdirectandasynchronousI/OandimplementstheOracleDataManagerAPI(simplifiedI/Osystemcallinterface)introducedinOracle9i.
OracleASMisnotageneral-purposefilesystemandcanbeusedonlyforOracledatafiles,redologs,controlfiles,andtheRMANFlashRecoveryArea.FilesinASMcanbecreatedandnamedautomaticallybythedatabase(byuseoftheOracleManagedFilesfeature)ormanuallybytheDBA.BecausethefilesstoredinASMarenotaccessibletotheoperatingsystem,theonlywaytoperformbackupandrecoveryoperationsondatabasesthatuseASMfilesisthroughRecoveryManager(RMAN).
ASMisimplementedasaseparateOracleinstancethatmustbeupifotherdatabasesaretobeabletoaccessit.MemoryrequirementsforASMarelight:
only64MBformostsystems.InOracleRACenvironments,anASMinstancemustberunningoneachclusternode.
PartI:
InstallingLinux
InstallandConfigureLinuxasdescribedinthefirstguideinthisseries.YouwillneedthreeIPaddressesforeachserver:
onefortheprivatenetwork,oneforthepublicnetwork,andoneforthevirtualIPaddress.Usetheoperatingsystem'snetworkconfigurationtoolstoassigntheprivateandpublicnetworkaddresses.DonotassignthevirtualIPaddressusingtheoperatingsystem'snetworkconfigurationtools;thiswillbedonebytheOracleVirtualIPConfigurationAssistant(VIPCA)duringOracleRACsoftwareinstallation.
RedHatEnterpriseLinux4(RHEL4)
RequiredKernel:
2.6.9-11.EL orhigher
Verifykernelversion:
#uname-r
2.6.9-22.ELsmp
Otherrequiredpackageversions(orhigher):
binutils-2.15.92.0.2-10.EL4
compat-db-4.1.25-9
control-center-2.8.0-12
gcc-3.4.3-9.EL4
gcc-c++-3.4.3-9.EL4
glibc-2.3.4-2
glibc-common-2.3.4-2
gnome-libs-1.4.1.2.90-44.1
libstdc++-3.4.3-9.EL4
libstdc++-devel-3.4.3-9.EL4
make-3.80-5
pdksh-5.2.14-30
sysstat-5.0.5-1
xscreensaver-4.18-5.rhel4.2
Verifyinstalledpackages:
#rpm-qbinutilscompat-dbcontrol-centergccgcc-c++glibcglibc-common\
gnome-libslibstdc++libstdc++-develmakepdkshsysstatxscreensaver
binutils-2.15.92.0.2-15
compat-db-4.1.25-9
control-center-2.8.0-12.rhel4.2
gcc-3.4.4-2
gcc-c++-3.4.4-2
glibc-2.3.4-2.13
glibc-common-2.3.4-2.13
gnome-libs-1.4.1.2.90-44.1
libstdc++-3.4.4-2
libstdc++-devel-3.4.4-2
make-3.80-5
pdksh-5.2.14-30.3
sysstat-5.0.5-1
xscreensaver-4.18-5.rhel4.9
SUSELinuxEnterpriseServer9(SLES9)
RequiredPackageSets:
BasisRuntimeSystem
YaST
GraphicalBaseSystem
LinuxTools
KDEDesktopEnvironment
C/C++CompilerandTools(notselectedbydefault)
Donotinstall:
AuthenticationServer(NIS,LDAP,Kerberos)
RequiredKernel:
2.6.5-7.97 orhigher
Verifykernelversion:
#uname-r
2.6.5-7.97-smp
Otherrequiredpackageversions(orhigher):
gcc-3.3
gcc-c++-3.3.3-43
glibc-2.3.3-98.28
libaio-0.3.98-18
libaio-devel-0.3.98-18
make-3.80
openmotif-libs-2.2.2-519.1
Verifyinstalledpackages:
#rpm-qgccgcc-c++glibclibaiolibaio-develmakeopenmotif-libs
gcc-3.3.3-43.24
gcc-c++-3.3.3-43.24
libaio-0.3.98-18.3
libaio-devel-0.3.98-18.3
make-3.80-184.1
openmotif-libs-2.2.2-519.1
PartII:
ConfigureLinuxforOracle
CreatetheOracleGroupsandUserAccount
Nextwe'llcreatetheLinuxgroupsanduseraccountthatwillbeusedtoinstallandmaintaintheOracle10gRelease2software.Theuseraccountwillbecalled'oracle'andthegroupswillbe'oinstall'and'dba.'Executethefollowingcommandsasrootononeclusternodeonly:
/usr/sbin/groupaddoinstall
/usr/sbin/groupadddba
/usr/sbin/useradd-m-goinstall-Gdbaoracle
idoracle
Ex:
#/usr/sbin/