购买

¥10.0

加入VIP
  • 专属下载券
  • 上传内容扩展
  • 资料优先审核
  • 免费资料无限下载

上传资料

关闭

关闭

关闭

封号提示

内容

首页 虚拟机安装rac

虚拟机安装rac.doc

虚拟机安装rac

仙人指路
2019-03-04 0人阅读 举报 0 0 0 暂无简介

简介:本文档为《虚拟机安装racdoc》,可适用于初中教育领域

配置linux环境编辑etchosts文件rootnode#vietchosts#Donotremovethefollowingline,orvariousprograms#thatrequirenetworkfunctionalitywillfail#nodelocalhostlocaldomainlocalhostlocalhostracracracvipracvipracprivracpriv配置内核参数vietcsysctlconfkernelshmall=kernelshmmax=kernelshmmni=kernelsem=fsfilemax=netipviplocalportrange=netcorermemdefault=netcorermemmax=netcorewmemdefault=netcorewmemmax=重启生效sbinsysctl–p提高Oracle用户的shell限制设置oracle使用的文件数权限vietcsecuritylimitsconf增加下列内容oraclesoftnprocoraclehardnprocoraclesoftnofileoraclehardnofile修改安全限制rootnode~#vietcpamdlogin增加:session  required    libsecuritypamlimitssovietcrclocalmodprobehangchecktimerhangchecktick=hangcheckmargin=在root用户下创建oralce用户和设置:groupaddoinstallgroupadddbauseraddgoinstallGdbaoraclepasswdoraclemkdirpuapporacleproductcrsmkdirpuapporacleproductdbmkdirpuoradatachownRoracleoinstallutouchetchostsequivchmodetchostsequivchownroot:rootetchostsequivvietchostsequivracoracleracoracleracprivoracleracprivoracle设置环境变量vihomeoraclebashprofile添加以下内容exportTMP=tmpexportTMPDIR=$TMPexportORACLEBASE=uapporacleexportORACLESID=racexportORACLEHOME=$ORACLEBASEproductdbexportORACRSHOME=$ORACLEBASEproductcrsexportLDLIBRARYPATH=$ORACLEHOMElibexportPATH=$ORACLEHOMEbin:$ORACRSHOMEbin:bin:usrbin:usrsbin:usrlocalbin:usrXRbinulimitunumask~安装oracleasm支持包驱动下载地址:http:wwworaclecomtechnologysoftwaretechlinuxasmlibrhelhtml创建asm数据库首先需要ASMLib驱动程序包可以从相关的网站下载到和操作系统对应的rpm文件分别为oracleasmsupport、oracleasmelel、oracleasmlibel。#rpmUvhoracleasm*rpm#rpmqa|greporacleasmoracleasmsupportoracleasmeleloracleasmlibelrootRHELDesktop#rpmivhoracleasmlibelirpmerror:Faileddependencies:oracleasm>=isneededbyoracleasmlibelirootRHELDesktop#Mykernelversionis:rootRHELDesktop#unamernRHEL     eloracleasmsupport、oracleasmelel、oracleasmlibel。创建共享磁盘手动创建G:RACshared点addHardware路径是racracsharedracsharevmdk块硬盘添加成功G:nodenodevmx打开vmx文件添加下列内容:disklocking="false"diskLibdataCacheMaxSize=""diskLibdataCacheMaxReadAheadSize=""diskLibDataCacheMinReadAheadSize=""diskLibdataCachePageSize=""diskLibmaxUnsyncedWrites=""scsisharedBus="VIRTUAL"scsi:deviceType="disk"scsi:deviceType="disk"scsi:deviceType="disk"scsi:deviceType="disk"scsi:deviceType="disk"提示:如果你创建有磁盘有多个注意要按照你的实际情况修改。创建OracleASM创建磁盘分区CddevLssd*rootnodedev#lssd*sdasdasdasdbsdcsddsdesdffdiskdevsdb需要你输入的依次是"np回车回车w"。DevicecontainsneitheravalidDOSpartitiontable,norSun,SGIorOSFdisklabelBuildinganewDOSdisklabelChangeswillremaininmemoryonly,untilyoudecidetowritethemAfterthat,ofcourse,thepreviouscontentwon'tberecoverableThenumberofcylindersforthisdiskissettoThereisnothingwrongwiththat,butthisislargerthan,andcouldincertainsetupscauseproblemswith:)softwarethatrunsatboottime(eg,oldversionsofLILO))bootingandpartitioningsoftwarefromotherOSs(eg,DOSFDISK,OSFDISK)Warning:invalidflagxofpartitiontablewillbecorrectedbyw(rite)Command(mforhelp):nCommandactioneextendedpprimarypartition()pPartitionnumber():Firstcylinder(,default):UsingdefaultvalueLastcylinderorsizeorsizeMorsizeK(,default):UsingdefaultvalueCommand(mforhelp):wThepartitiontablehasbeenaltered!Callingioctl()torereadpartitiontableSyncingdisksrootnodedev#lssd*sdasdasdasdbsdbsdcsddsdesdf把所有的sdcsddsdesdf设置完成!rootnodedev#lssd*sdasdasdasdbsdbsdcsdcsddsddsdesdesdfsdf安装asm所需要的支持包安装oracleasmlib程序包。从OTN下载ASM库并以root用户身份安装ASMRPMhttp:wwworaclecomtechnologyxasmlibrhelhtml查看操作系统内核版本:nodedev#unameaLinuxnodeelxen#SMPFriJan::ESTiiiGNULinuxLibraryandTools·oracleasmsupportelirpm·oracleasmlibelirpmDriversforkernelel·oracleasmelxenelirpm·oracleasmelPAEelirpm·oracleasmelelirpm提示如果在安装过程中提示你缺少其它包你可以先到操作系统安装光盘中寻找并安装所需系统包然后再来安装下载到的包。rootnodeoracleasm#rpmivh*rootnodeoracleasm#rpmivhoracleasmelPAEelirpmerror:Faileddependencies:kernelPAE=elisneededbyoracleasmelPAEeli本人在安装过程中缺少kernelPAEelirpm在第一张盘中找到装上即可。配置裸设备由于RHEL中取消了rawdevices如果不想将映射命令放到rclocal中的话我们就需要将其配置到etcudevrulesd文件夹中修改文件etcudevrulesdrawrulesvietcudevrulesdrawrules添加以下内容ACTION=="add",KERNEL=="devsdb",RUN="binrawdevrawrawN"ACTION=="add",ENV{MAJOR}=="",ENV{MINOR}=="",RUN="binrawdevrawrawMm"ACTION=="add",KERNEL=="devsdc",RUN="binrawdevrawrawN"ACTION=="add",ENV{MAJOR}=="",ENV{MINOR}=="",RUN="binrawdevrawrawMm"ACTION=="add",KERNEL=="devsdd",RUN="binrawdevrawrawN"ACTION=="add",ENV{MAJOR}=="",ENV{MINOR}=="",RUN="binrawdevrawrawMm"ACTION=="add",KERNEL=="devsde",RUN="binrawdevrawrawN"ACTION=="add",ENV{MAJOR}=="",ENV{MINOR}=="",RUN="binrawdevrawrawMm"ACTION=="add",KERNEL=="devsdf",RUN="binrawdevrawrawN"ACTION=="add",ENV{MAJOR}=="",ENV{MINOR}=="",RUN="binrawdevrawrawMm"KERNEL=="raw",OWNER="oracle",GROUP="oinstall",MODE=""重启下服务:rootnodedev#startudevStartingudev:OK验证以下:rootnoderaw#lsltdevrawtotalcrwroracleoinstall,Jul:rawcrwroracleoinstall,Jul:rawcrwroracleoinstall,Jul:rawcrwroracleoinstall,Jul:rawcrwroracleoinstall,Jul:raw以oracle用户执行lnsdevrawrawuoradataocrlnsdevrawrawuoradatavotingdisklnsdevrawrawuoradataasmlnsdevrawrawuoradataasmlnsdevrawrawuoradataasm查看下oraclenodeoradata$lslrttotallrwxrwxrwxoracleoinstallJul:votingdisk>devrawrawlrwxrwxrwxoracleoinstallJul:ocr>devrawrawlrwxrwxrwxoracleoinstallJul:asm>devrawrawlrwxrwxrwxoracleoinstallJul:asm>devrawrawlrwxrwxrwxoracleoinstallJul:asm>devrawraw配置第二个节点:拷贝node生成新节点:修改:G:nodenodevmxG:nodenodevmx并修改以下内容:displayName="node"在虚拟机中加入节点点run选Icopiedit启动系统修改hostname将node改成noderootnode~#hostnamenoderootnode~#vietcsysconfignetwork这样重启之后机器名称就会变成node了。用systemconfignetwork命令EthIp设为,子网掩码:网关:EthIp设为,子网掩码:网关:激活网卡修改oracle中的bashprofileORACLESID=racexportORACLESID重启节点配置Clusterware安装环境设置ssh在clusterware(CRS)和RacDatabase安装过程中OracleUniversalInstaller(OUI)必须能够以oracle的身份自动将软件复制到所有RAC节点。这里我们通过配置ssh让oracle用户拥有不输入密码即可访问各节点的能力。首先两个节点间以及与网关要ping通要确保都是通的rootnode~#pingPING()()bytesofdatabytesfrom:icmpseq=ttl=time=msbytesfrom:icmpseq=ttl=time=mspingstatisticspacketstransmitted,received,packetloss,timemsrttminavgmaxmdev=msrootnode~#pingPING()()bytesofdatabytesfrom:icmpseq=ttl=time=msbytesfrom:icmpseq=ttl=time=mspingstatisticspacketstransmitted,received,packetloss,timemsrttminavgmaxmdev=msrootnode~#pingPING()()bytesofdatabytesfrom:icmpseq=ttl=time=msbytesfrom:icmpseq=ttl=time=ms要建立用户等效性需要在两个节点上以oracle用户身份生成用户的公钥和私钥首先在node执行rootnode~#suoracleoraclenode~$mkdir~sshoraclenode~$chmod~sshoraclenode~$sshkeygentrsaGeneratingpublicprivatersakeypairEnterfileinwhichtosavethekey(homeoraclesshidrsa):Enterpassphrase(emptyfornopassphrase):Entersamepassphraseagain:YouridentificationhasbeensavedinhomeoraclesshidrsaYourpublickeyhasbeensavedinhomeoraclesshidrsapubThekeyfingerprintis:::d:::a:::f:e:b:b:b:e:a:oraclenodeoraclenode~$sshkeygentdsaGeneratingpublicprivatedsakeypairEnterfileinwhichtosavethekey(homeoraclesshiddsa):Enterpassphrase(emptyfornopassphrase):Entersamepassphraseagain:YouridentificationhasbeensavedinhomeoraclesshiddsaYourpublickeyhasbeensavedinhomeoraclesshiddsapubThekeyfingerprintis:a:::ba:e::aa:::d:e:f:ad:f::oraclenode然后node执行rootnode~#suoracleoraclenode~$mkdir~sshoraclenode~$chmod~sshoraclenode~$sshkeygentrsaGeneratingpublicprivatersakeypairEnterfileinwhichtosavethekey(homeoraclesshidrsa):Enterpassphrase(emptyfornopassphrase):Entersamepassphraseagain:YouridentificationhasbeensavedinhomeoraclesshidrsaYourpublickeyhasbeensavedinhomeoraclesshidrsapubThekeyfingerprintis:d::::aa:d:b:b:e:bd:ca:fd:::bd:boraclenodeoraclenode~$sshkeygentdsaGeneratingpublicprivatedsakeypairEnterfileinwhichtosavethekey(homeoraclesshiddsa):Enterpassphrase(emptyfornopassphrase):Entersamepassphraseagain:YouridentificationhasbeensavedinhomeoraclesshiddsaYourpublickeyhasbeensavedinhomeoraclesshiddsapubThekeyfingerprintis:df::a::b:a:::e::d::d:a::oraclenode切换回node接着执行:sshoraclenode~$cat~sshidrsapub>>~sshauthorizedkeysoraclenode~$cat~sshiddsapub>>~sshauthorizedkeys提示:下列命令会提示你输入node的oracle密码按照提示输入即可如果失败可重新尝试执行命令。oraclenode~$sshraccat~sshidrsapub>>~sshauthorizedkeysTheauthenticityofhost'rac()'can'tbeestablishedRSAkeyfingerprintisf::c:e::f::c:c:bb:e::ba:e:ba:Areyousureyouwanttocontinueconnecting(yesno)yesWarning:Permanentlyadded'rac,'(RSA)tothelistofknownhostsoraclerac'spassword:oraclenode~$sshraccat~sshiddsapub>>~sshauthorizedkeysoraclerac'spassword:oraclenode~$scp~sshauthorizedkeysrac:~sshauthorizedkeysoraclerac'spassword:authorizedkeysKBs:查看公钥私钥是否生效节点rac执行sshracdatesshracdatesshracprivdatesshracprivdate节点rac:执行sshracdatesshracdatesshracprivdatesshracprivdate配置asm注意:必须以root身份进行首先在node执行:rootnode~#etcinitdoracleasmconfigureConfiguringtheOracleASMlibrarydriverThiswillconfiguretheonbootpropertiesoftheOracleASMlibrarydriver  Thefollowingquestionswilldeterminewhetherthedriverisloadedonbootandwhatpermissionsitwillhave  Thecurrentvalueswillbeshowninbrackets('')  Hitting<ENTER>withouttypingananswerwillkeepthatcurrentvalue  CtrlCwillabortDefaultusertoownthedriverinterface:oracleDefaultgrouptoownthedriverinterface:dbaStartOracleASMlibrarydriveronboot(yn)n:yFixpermissionsofOracleASMdisksonboot(yn)y:yWritingOracleASMlibrarydriverconfiguration:  OK  Loadingmodule"oracleasm":  OK  MountingASMlibdriverfilesystem:  OK  ScanningsystemforASMdisks:  OK  提示:如果本步执行出错(可能出错机率最高的是在ScanningsystemforASM)不妨将转换一下命令行的执行方式改成:rootnode~#shetcinitdoracleasmconfigure有可能解决你的问题!然后切换至node执行rootnode~#etcinitdoracleasmconfigureConfiguringtheOracleASMlibrarydriverThiswillconfiguretheonbootpropertiesoftheOracleASMlibrarydriver  Thefollowingquestionswilldeterminewhetherthedriverisloadedonbootandwhatpermissionsitwillhave  Thecurrentvalueswillbeshowninbrackets('')  Hitting<ENTER>withouttypingananswerwillkeepthatcurrentvalue  CtrlCwillabortDefaultusertoownthedriverinterface:oracleDefaultgrouptoownthedriverinterface:dbaStartOracleASMlibrarydriveronboot(yn)n:yFixpermissionsofOracleASMdisksonboot(yn)y:yWritingOracleASMlibrarydriverconfiguration:  OK  Loadingmodule"oracleasm":  OK  MountingASMlibdriverfilesystem:  OK  ScanningsystemforASMdisks:  OK  再切换回node执行rootnode~#etcinitdoracleasmcreatediskVOLdevsdbMarkingdisk"devsdd"asanASMdisk:  OK  rootnode~#etcinitdoracleasmcreatediskVOLdevsdcMarkingdisk"devsde"asanASMdisk:  OK  rootnode~#etcinitdoracleasmcreatediskVOLdevsddMarkingdisk"devsde"asanASMdisk:  OK  rootnode~#etcinitdoracleasmcreatediskVOLdevsdeMarkingdisk"devsde"asanASMdisk:  OK  rootnode~#etcinitdoracleasmcreatediskVOLdevsdfMarkingdisk"devsde"asanASMdisk:  OK  rootnodelinuxpatch#etcinitdoracleasmscandisksScanningsystemforASMdisks:  OK  查看一下当前的磁盘组:ScanningsystemforASMdisks:  OK  rootnode~#etcinitdoracleasmlistdisksVOLVOLVOLVOLVOLNode上也查看一下当前磁盘组:rootnode~#etcinitdoracleasmscandisksScanningsystemforASMdisks:  OK  rootnode~#etcinitdoracleasmlistdisksVOLVOLVOLVOLVOLOk,配置完成准备进入到crs的安装阶段另外由于我们使用了RHEL并不被oracleg所支持因此在执行安装时需要指定ignoreSysPrereqs跳过安装时的操作系统检查。runInstaller–ignoreSysPrereqs出现errorExceptionjavalangUnsatisfiedLinkError:tmpOraInstallAMjrelibilibawtso:libXpso:cannotopensharedobjectfile:NosuchfileordirectoryoccurredjavalangUnsatisfiedLinkError:tmpOraInstallAMjrelibilibawtso:libXpso:cannotopensharedobjectfile:Nosuchfileordirectory在RHEL中上面的包被libXp所取代了因此rpmivhlibXpirpm将包打上后问题即可解决。(两个节点都打上包)修改vipca文件rootnodeopt#vioptoragproductcrsbinvipca找到如下内容:    Removethisworkaroundwhenthebugisfixed    arch=`unamem`    if"$arch"="i"o"$arch"="ia"    then        LDASSUMEKERNEL=        exportLDASSUMEKERNEL    fi    #Endworkaround在fi后新添加一行:v以及srvctl文件rootnodeopt#vioptoragproductcrsbinsrvctl找到如下内容:LDASSUMEKERNEL=exportLDASSUMEKERNEL同样在其后新增加一行:unsetLDASSUMEKERNEL保存退出然后在node重新执行rootsh当然既然我们已经知道了有这个问题建议最好在node执行rootsh之前首先修改vipca。其实同时需要你改的还有$ORACLEHOMEbinsrvctl文件不然等装完数据库之后srvctl命令也是会报这个错误地。要知道srvctl这么常用如果它执行老报错那可是相当致命啊。不过呢你现在才安装到crs离createdb还远着呢大可以等到创建完数据库待到需要管理时再修改该文件。Error(Native:listNetInterfaces:)Error(Native:listNetInterfaces:)解决方式如下:===============================rootnodebin#oifcfgiflistethethrootnodebin#oifcfgsetifglobaleth:publicrootnodebin#oifcfgsetifglobaleth:clusterinterconnectrootnodebin#oifcfggetifeth    global  publiceth   global  clusterinterconnectvipva点击finishdi回到节点点ok切换oracle用户oraclerac~$crsstattNameTypeTargetStateHostoraracgsdapplicationONLINEONLINEracoraraconsapplicationONLINEONLINEracoraracvipapplicationONLINEONLINEracoraracgsdapplicationONLINEONLINEracoraraconsapplicationONLINEONLINEracoraracvipapplicationONLINEONLINEracok!这里crs安装完毕遇见那么多麻烦休息一下然后安装database软件安装软件runInstaller–ignoreSysPrereqsGivingup:OracleCSSstackappearsNOTtoberunningOracleCSSservicewouldnotstartasinstalledAutomaticStorageManagement(ASM)cannotbeuseduntilOracleCSSserviceisstarted"利用dbca建立数据库

用户评价(0)

关闭

新课改视野下建构高中语文教学实验成果报告(32KB)

抱歉,积分不足下载失败,请稍后再试!

提示

试读已结束,如需要继续阅读或者下载,敬请购买!

评分:

/46

¥10.0

立即购买

VIP

在线
客服

免费
邮箱

爱问共享资料服务号

扫描关注领取更多福利