Oracle Database 11g Release 2 RAC On Linux Using VirtualBox.docx

上传人:b****2 文档编号:1959444 上传时间:2023-05-02 格式:DOCX 页数:46 大小:1.10MB
下载 相关 举报
Oracle Database 11g Release 2 RAC On Linux Using VirtualBox.docx_第1页
第1页 / 共46页
Oracle Database 11g Release 2 RAC On Linux Using VirtualBox.docx_第2页
第2页 / 共46页
Oracle Database 11g Release 2 RAC On Linux Using VirtualBox.docx_第3页
第3页 / 共46页
Oracle Database 11g Release 2 RAC On Linux Using VirtualBox.docx_第4页
第4页 / 共46页
Oracle Database 11g Release 2 RAC On Linux Using VirtualBox.docx_第5页
第5页 / 共46页
Oracle Database 11g Release 2 RAC On Linux Using VirtualBox.docx_第6页
第6页 / 共46页
Oracle Database 11g Release 2 RAC On Linux Using VirtualBox.docx_第7页
第7页 / 共46页
Oracle Database 11g Release 2 RAC On Linux Using VirtualBox.docx_第8页
第8页 / 共46页
Oracle Database 11g Release 2 RAC On Linux Using VirtualBox.docx_第9页
第9页 / 共46页
Oracle Database 11g Release 2 RAC On Linux Using VirtualBox.docx_第10页
第10页 / 共46页
Oracle Database 11g Release 2 RAC On Linux Using VirtualBox.docx_第11页
第11页 / 共46页
Oracle Database 11g Release 2 RAC On Linux Using VirtualBox.docx_第12页
第12页 / 共46页
Oracle Database 11g Release 2 RAC On Linux Using VirtualBox.docx_第13页
第13页 / 共46页
Oracle Database 11g Release 2 RAC On Linux Using VirtualBox.docx_第14页
第14页 / 共46页
Oracle Database 11g Release 2 RAC On Linux Using VirtualBox.docx_第15页
第15页 / 共46页
Oracle Database 11g Release 2 RAC On Linux Using VirtualBox.docx_第16页
第16页 / 共46页
Oracle Database 11g Release 2 RAC On Linux Using VirtualBox.docx_第17页
第17页 / 共46页
Oracle Database 11g Release 2 RAC On Linux Using VirtualBox.docx_第18页
第18页 / 共46页
Oracle Database 11g Release 2 RAC On Linux Using VirtualBox.docx_第19页
第19页 / 共46页
Oracle Database 11g Release 2 RAC On Linux Using VirtualBox.docx_第20页
第20页 / 共46页
亲,该文档总共46页,到这儿已超出免费预览范围,如果喜欢就下载吧!
下载资源
资源描述

Oracle Database 11g Release 2 RAC On Linux Using VirtualBox.docx

《Oracle Database 11g Release 2 RAC On Linux Using VirtualBox.docx》由会员分享,可在线阅读,更多相关《Oracle Database 11g Release 2 RAC On Linux Using VirtualBox.docx(46页珍藏版)》请在冰点文库上搜索。

Oracle Database 11g Release 2 RAC On Linux Using VirtualBox.docx

OracleDatabase11gRelease2RACOnLinuxUsingVirtualBox

OracleDatabase11gRelease2RACOnLinuxUsingVirtualBox

ThisarticledescribestheinstallationofOracleDatabase11grelease2(11.264-bit)RAConLinux(OracleLinux5.564-bit)usingVirtualBox(3.2.8)withnoadditionalshareddiskdevices.

∙Introduction

∙DownloadSoftware

∙VirtualBoxInstallation

∙VirtualMachineSetup

∙GuestOperatingSystemInstallation

∙OracleInstallationPrerequisites

∙InstallGuestAdditions

∙CreateSharedDisks

∙ClonetheVirtualMachine

∙InstalltheGridInfrastructure

∙InstalltheDatabase

∙ChecktheStatusoftheRAC

Introduction

OneofthebiggestobstaclespreventingpeoplefromsettinguptestRACenvironmentsistherequirementforsharedstorage.Inaproductionenvironment,sharedstorageisoftenprovidedbyaSANorhigh-endNASdevice,butbothoftheseoptionsareveryexpensivewhenallyouwanttodoisgetsomeexperienceinstallingandusingRAC.AcheaperalternativeistouseaFireWirediskenclosuretoallowtwomachinestoaccessthesamedisk(s),butthatstillcostsmoneyandrequirestwoservers.Athirdoptionistousevirtualizationtofakethesharedstorage.

UsingVirtualBoxyoucanrunmultipleVirtualMachines(VMs)onasingleserver,allowingyoutorunbothRACnodesonasinglemachine.Inadditon,itallowsyoutosetupsharedvirtualdisks,overcomingtheobstacleofexpensivesharedstorage.

Beforeyoulaunchintothisinstallation,hereareafewthingstoconsider.

∙Thefinishedsystemincludesthehostoperatingsystem,twoguestoperatingsystems,twosetsofOracleGridInfrastructure(Clusterware+ASM)andtwoDatabaseinstancesallonasingleserver.Asyoucanimagine,thisrequiresasignificantamountofdiskspace,CPUandmemory.IcompletedthisinstallationonaQuad-Coreprocessorwith8Gofmemory,sodon'texpecttoworkonalowspecmachine.

∙Followingonfromthelastpoint,theVMswilleachneedatleast2GofRAM(3Gfor11.2.0.2),preferably3-4Gifyoudon'twanttheVMstoswaplikecrazy.Asyoucansee,11gR2RACrequiresmuchmorememorythan11gR1RAC.Don'tassumeyouwillbeabletorunthisonasmallPCorlaptop.Youwon't.

∙ThisprocedureprovidesabarebonesinstallationtogettheRACworking.ThereisnoredundancyintheGridInfrastructureinstallationortheASMinstallation.Toaddthis,simplycreatedoubletheamountofshareddisksandselectthe"Normal"redundancyoptionwhenitisoffered.Ofcourse,thiswilltakemorediskspace.

∙Duringthevirtualdiskcreation,Ialwayschoosenottopreallocatethediskspace.Thismakesvirtualdiskaccessslowerduringtheinstallation,butsavesonwasteddiskspace.Theshareddisksmusthavetheirspacepreallocated.

∙Thisisnot,andshouldnotbeconsidered,aproduction-readysystem.It'ssimplytoallowyoutogetusedtoinstallingandusingRAC.

∙TheSingleClientAccessName(SCAN)shouldreallybedefinedintheDNSorGNSandround-robinbetweenoneof3addresses,whichareonthesamesubnetasthepublicandvirtualIPs.InthisarticleI'vedefineditasasingleIPaddressinthe"/etc/hosts"file,whichiswrongandwillcausetheclusterverificationtofail,butitallowsmetocompletetheinstallwithoutthepresenceofaDNS.

∙Thevirtualmachinescanbelimitedto2Gigofswap,whichcausesaprerequisitecheckfailure,butdoesn'tpreventtheinstallationworking.Ifyouwanttoavoidthis,define3+Gigofswap.

∙Thisarticleusesthe64-bitversionsofOracleLinuxandOracle11gRelease2.

DownloadSoftware

Downloadthefollowingsoftware.

∙OracleLinux5.5

∙VirtualBox(Mustbeversion3.2.8orlater)

∙Oracle11gRelease2(11.2)Software(64bit)

VirtualBoxInstallation

First,installtheVirtualBoxsoftware.OnRHELanditsclonesyoudothiswiththefollowingcommandastherootuser.

#rpm-UvhVirtualBox-3.2-3.2.8_64453_rhel5-1.x86_64.rpm

Oncecomplete,VirtualBoxisstartedfromthe"Applications>SystemTools>OracleVMVirtualBox"menuoption.

VirtualMachineSetup

NowwemustdefinethetwovirtualRACnodes.WecansavetimebydefiningoneVM,thencloningitwhenitisinstalled.

StartVirtualBoxandclickthe"New"buttononthetoolbar.Clickthe"Next"buttononthefirstpageoftheVirtualMachineWizard.

Enterthename"rac1",OS"Linux"andVersion"Oracle(64bit)",thenclickthe"Next"button.

Enter"2048"asthebasememorysize,thenclickthe"Next"button.

Acceptthedefaultoptiontocreateanewvirtualharddiskbyclickingthe"Next"button.

Clickthe"Next"buttonontheCreateVirtualDiskWizardwelcomescreen.

Accceptthedefaultoptionbyclickingthe"Next"button.

Acceptthedefaultlocationandsetthesizeto"20G"andclickthe"Next"button.

Clickthe"Finish"buttonontheVirtualDiskWizardSummaryscreen.

Clickthe"Finish"buttonontheVirtualMachineWizardSummaryscreen.

The"rac1"VMwillappearonthelefthandpane.Scrolldownthe"Details"tabontherightandclickonthe"Network"link.

Makesure"Adapter1"isenabled,setto"BridgedAdapter"and"eth0",thenclickonthe"Adapter2"tab.

Makesure"Adapter2"isenabled,setto"BridgedAdapter"and"eth0",thenclickonthe"OK"button.

Thevirtualmachineisnowconfiguredsowecanstarttheguestoperatingsysteminstallation.

GuestOperatingSystemInstallation

PlacetheOracleLinux5DVDintheDVDdriveandstartthevirtualmachinebyclickingthe"Start"buttononthetoolbar.TheresultingconsolewindowwillcontaintheOracleLinuxbootscreen.

ContinuethroughtheOracleLinux5installationasyouwouldforanormalserver.Ageneralpictorialguidetotheinstallationcanbefoundhere.Morespecifically,itshouldbeaserverinstallationwithaminimumof2Gswap(3-4Gifyouwanttoavoidwarnings),firewallandSELinuxdisabledandthefollowingpackagegroupsinstalled:

∙GNOMEDesktopEnvironment

∙Editors

∙GraphicalInternet

∙Text-basedInternet

∙DevelopmentLibraries

∙DevelopmentTools

∙ServerConfigurationTools

∙AdministrationTools

∙Base

∙SystemTools

∙XWindowSystem

Tobeconsistentwiththerestofthearticle,thefollowinginformationshouldbesetduringtheinstallation:

∙hostname:

rac1.localdomain

∙IPAddresseth0:

192.168.2.101(publicaddress)

∙DefaultGatewayeth0:

192.168.2.1(publicaddress)

∙IPAddresseth1:

192.168.0.101(privateaddress)

∙DefaultGatewayeth1:

none

YouarefreetochangetheIPaddressestosuityournetwork,butremembertostayconsistentwiththoseadjustmentsthroughouttherestofthearticle.

Oncethebasicinstallationiscomplete,installthefollowingpackageswhilstloggedinastherootuser.Thisincludesthe64-bitand32-bitversionsofsomepackages.

#FromOracleLinux5DVD

cd/media/cdrom/Server

rpm-Uvhbinutils-2.*

rpm-Uvhcompat-libstdc++-33*

rpm-Uvhelfutils-libelf-0.*

rpm-Uvhelfutils-libelf-devel-*

rpm-Uvhgcc-4.*

rpm-Uvhgcc-c++-4.*

rpm-Uvhglibc-2.*

rpm-Uvhglibc-common-2.*

rpm-Uvhglibc-devel-2.*

rpm-Uvhglibc-headers-2.*

rpm-Uvhksh-2*

rpm-Uvhlibaio-0.*

rpm-Uvhlibaio-devel-0.*

rpm-Uvhlibgcc-4.*

rpm-Uvhlibstdc++-4.*

rpm-Uvhlibstdc++-devel-4.*

rpm-Uvhmake-3.*

rpm-Uvhsysstat-7.*

rpm-UvhunixODBC-2.*

rpm-UvhunixODBC-devel-2.*

#ForOracleLinux,userelevantversionsofthefollowingpackagesfromyourmedia.

rpm-Uvhoracleasm-2.6.18-194.el5-2.0.5-1.el5.x86_64.rpm\

oracleasm-support-2.1.3-1.el5.x86_64.rpm

cd/

eject

#InstallthefollowingpackagefromtheOraclegridmedia.

cd/your/path/to/grid/rpm

rpm-Uvhcvuqdisk*

OracleInstallationPrerequisites

Performthefollowingstepswhilstloggedintothe"rac1"virtualmachineastherootuser.

MakesurethesharedmemoryfilesystemisbigenoughforAutomaticMemoryManagertowork.

#umounttmpfs

#mount-ttmpfsshmfs-osize=1500m/dev/shm

Makethesettingpermanentbyamendingthe"tmpfs"settingofthe"/etc/fstab"filetolooklikethis.

tmpfs/dev/shmtmpfssize=1500m00

IfyouarenotusingDNS,the"/etc/hosts"filemustcontainthefollowinginformation.

127.0.0.1localhost.localdomainlocalhost

#Public

192.168.2.101rac1.localdomainrac1

192.168.2.102rac2.localdomainrac2

#Private

192.168.0.101rac1-priv.localdomainrac1-priv

192.168.0.102rac2-priv.localdomainrac2-priv

#Virtual

192.168.2.111rac1-vip.localdomainrac1-vip

192.168.2.112rac2-vip.localdomainrac2-vip

#SCAN

192.168.2.201rac-scan.localdomainrac-scan

Note.TheSCANaddressshouldnotreallybedefinedinthehostsfile.InsteadisshouldbedefinedontheDNStoround-robinbetween3addressesonthesamesubnetasthepublicIPs.Forthisinstallation,wewillcompromiseandusethehostsfile.

IfyouareusingDNS,thenonlythefirstlineshouldbepresentinthe"/etc/hosts"file.TheotherentriesaredefinedintheDNS,asdescribedhere.

Addoramendthefollowinglinestothe"/etc/sysctl.conf"file.

fs.aio-max-nr=1048576

fs.file-max=6815744

kernel.shmall=2097152

kernel.shmmax=1054504960

kernel.shmmni=4096

#semaphores:

semmsl,semmns,semopm,semmni

kernel.sem=25032000100128

net.ipv4.ip_local_port_range=900065500

net.core.rmem_default=262144

net.core.rmem_max=4194304

net.core.wmem_default=262144

net.core.wmem_max=1048586

Runthefollowingcommandtochangethecurrentkernelparameters.

/sbin/sysctl-p

Addthefollowinglinestothe"/etc/security/limits.conf"file.

oraclesoftnproc2047

oraclehardnproc16384

oraclesoftnofile1024

oraclehardnofile65536

Addthefollowinglinestothe"/etc/pam.d/login"file,ifitdoesnotalreadyexist.

sessionrequiredpam_limits.so

Disablesecurelinuxbyeditingthe"/etc/selinux/config"file,makingsuretheSELINUXflagisse

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 解决方案 > 学习计划

copyright@ 2008-2023 冰点文库 网站版权所有

经营许可证编号:鄂ICP备19020893号-2