计算机软件及应用ORACLE 11g R2 for suse11集群双机部署_第1页
计算机软件及应用ORACLE 11g R2 for suse11集群双机部署_第2页
计算机软件及应用ORACLE 11g R2 for suse11集群双机部署_第3页
计算机软件及应用ORACLE 11g R2 for suse11集群双机部署_第4页
计算机软件及应用ORACLE 11g R2 for suse11集群双机部署_第5页
已阅读5页,还剩39页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

ORACLE11gR2.03rac安装forSUSELinux11主机环境准备:rac1:Hostname:rac1IP:/24rac1-priv:/24ntp:rac2:Hostname:rac2IP:/24rac1-priv:/24ntp:共享存储:/dev/sdb1G(锁盘,争议盘)/dev/sdc16G(共享数据盘)/etc/hosts:rac1rac1rac1-privrac1-privrac2rac2.3rac2-privrac2-privrac1-viprac1-viprac2-viprac2-viprac-scanrac-scan下面的PACKAGE应该包含在Default-RPMs,需要确认(x86_64)(x86_64)glibc-32bit-2.9-13.2(x86_64)(x86_64)(x86_64)libaio-32bit-0.3.104-140.22(x86_64)libstdc++33-3.3.3-11.9(x86_64)libstdc++33-32bit-3.3.3-11.9(x86_64)libstdc++43-4.3.3_20081022-11.18(x86_64)libstdc++43-32bit-4.3.3_20081022-11.18(x86_64)(x86_64)(x86_64)下面的PACKAGE需要另外安装noarch/linux-kernel-headers-2.6.27-2.22.noarch.rpmglibc-devel-32bitlibstdclibgomp43-32bit-4.3.3_20081022-11.18.x86_64.rpmgcc43-32bit-4.3.3_20081022-11.18.x86_64.rpmgcc43-c++-4.3.3_20081022-11.18.x86_64.rpmlibaio-devel-32bit-0.3.104-140.22.x86_64.rpm上述所有的PACKAGE,都可以在SLES1164-bit(x86_64)distributionmedia中找到。rpm-ivh(下载)rpm-ivh(光盘)rpm-ivh(光盘)rpm-ivh(下载)vi/etc/#Disableresponsetobroadcasts.#Youdon'twantyourselfbecomingaS.ipv4.icmp_echo_ignore_broadcasts=1#enablerouteverificationonallinterfacesnet.ipv4.conf.all.rp_filter=1#enableipV6forwarding#net.ipv6.conf.all.forwarding=1#increasethenumberofpossibleinotify(7)watches=65536-max=6815744=2007748608=4096kernel.sem=25032000100128=1000#avoiddeletingsecondaryIPsondeletingtheprimaryIPmote_secondaries=1mote_secondaries=1=262144=4194304=262144=1048576net.ipv4.ip_local_port_range=900065500sysctl–p虚机vmx设置:需编辑加入:="FALSE"="0"="0"="0"="4096"="0"scsi1.present="TRUE"scsi1.sharedBus="physical"scsi1.virtualDev="lsilogic"vmci0.unrestricted="TRUE"scsi1:1.SharedBus="Virtual"scsi1:1.shared="TRUE"scsi1:1.mode="independent-persistent"scsi1:1.present="TRUE"scsi1:1.fileName="rac1_2.vmdk"scsi1:1.deviceType="scsi-hardDisk"scsi1:2.SharedBus="Virtual"scsi1:2.shared="TRUE"scsi1:2.mode="independent-persistent"scsi1:2.present="TRUE"scsi1:2.fileName="rac1_3.vmdk"scsi1:2.deviceType="scsi-hardDisk"Oracle安装用户和组设置创建用户和组建立Oracle安装目录组:/usr/sbin/groupadd–g1000oinstall建立OracleASMDBA组:/usr/sbin/groupadd-g1002asmadmin/usr/sbin/groupadd-g1003asmdba/usr/sbin/groupadd-g1004asmoper/usr/sbin/groupadd-g1001dba建立Grid安装用户grid:#mkdir/home/grid#/usr/sbin/useradd-u1001-goinstall-Gasmadmin,asmdba,asmoper,dba-d/home/grid/grid建立Oracle安装用户oracle:/usr/sbin/useradd-u1000-goinstall-Gdba,asmdba-d/home/oracle/oracle用户shelllimit设置1、修改/etc/security/limits.confOracle:oraclesoftnproc2047oraclehardnproc16384oraclesoftnofile1024oraclehardnofile65536oraclesoftstack10240Grid:gridsoftnproc2047gridhardnproc16384gridsoftnofile1024gridhardnofile65536gridsoftstack102402、修改/etc//login,如果不存在,则创建该文件session3、修改defaultshellstartupfileForkshbsh,/etc/profile:if[$USER="oracle"]||[$USER="grid"];thenif[$SHELL="/bin/ksh"];thenulimit-p16384ulimit-n65536elseulimit-u16384-n65536fiumask022fiForCSH,/etc/:if($USER="oracle"||$USER="grid")thenlimitmaxproc16384limitdescriptors65536endif数据库安装用户file文件内容如下:PATH=/usr/bin:/etc:/usr/sbin:/usr/ucb:$HOME/bin:/usr/bin/X11:/sbin:.:$PATHexportPATHexportORACLE_BASE=/oracle/app/gridbaseexportORACLE_HOME=/oracle/app/gridexportPATH=$PATH:$ORACLE_HOME/binset-oviif[-s"$MAIL"]#ThisisatShellstartup.Innormalthenecho"$MAILMSG"#operation,theShellchecksfi#periodically.umask022GI_OUI=/home/oracle/softexportGI_OUI数据库安装用户file文件内容如下:PATH=/usr/bin:/etc:/usr/sbin:/usr/ucb:$HOME/bin:/usr/bin/X11:/sbin:.:$PATHexportPATHexportORACLE_BASE=/oracle/app/oracleexportORACLE_HOME=/oracle/app/oracle/dbhomeexportPATH=$PATH:$ORACLE_HOME/binset-oviif[-s"$MAIL"]#ThisisatShellstartup.Innormalthenecho"$MAILMSG"#operation,theShellchecksfi#periodically.umask022OUI_HOME=/home/oracle/softexportOUI_HOMEOracleinventory目录mkdir-p/oracle/app/oraInventorychown-Rgrid:oinstall/oracle/app/oraInventorychmod-R775/oracle/app/oraInventoryGridInfrastructureBASE目录mkdir–p/oracle/app/gridchowngrid:oinstall/oracle/app/gridchmod-R775/oracle/app/gridGridInfrastructureHome目录mkdirchown-Rgrid:oinstallchmodOracleBase目录mkdir-p/oracle/app/oraclemkdir/oracle/app/oracle/cfgtoollogs--neededtoensurethatdbcaisabletorunaftertherdbmsinstallation.chown-Roracle:oinstall/oracle/app/oraclechmod-R775/oracle/app/oracleOracleRdbmsHome目录mkdirchown-Roracle:oinstallchmodchown-Rgrid:oinstall/oracleASM配置:rac1:~#fdisk/dev/sdbDevicecontainsneitheravalidDOSpartitiontable,norSun,SGIorOSFdisklabelBuildinganewDOSdisklabelwithdiskidentifier0xd5649c9a.Changeswillremaininmemoryonly,untilyoudecidetowritethem.Afterthat,ofcourse,thepreviouscontentwon'tberecoverable.Warning:invalidflag0x0000ofpartitiontable4willbecorrectedbyw(rite)Command(mforhelp):nCommandactioneextendedpprimarypartition(1-4)pPartitionnumber(1-4):1Firstcylinder(1-130,default1):Usingdefaultvalue1Lastcylinder,+cylindersor+size{K,M,G}(1-130,default130):Usingdefaultvalue130Command(mforhelp):wThepartitiontablehasbeenaltered!Callingioctl()tore-readpartitiontable.Syncingdisks.rac1:~#fdisk/dev/sdcDevicecontainsneitheravalidDOSpartitiontable,norSun,SGIorOSFdisklabelBuildinganewDOSdisklabelwithdiskidentifier0x106c3178.Changeswillremaininmemoryonly,untilyoudecidetowritethem.Afterthat,ofcourse,thepreviouscontentwon'tberecoverable.Thenumberofcylindersforthisdiskissetto2088.Thereisnothingwrongwiththat,butthisislargerthan1024,andcouldincertainsetupscauseproblemswith:1)softwarethatrunsatboottime(e.g.,oldversionsofLILO)2)bootingandpartitioningsoftwarefromotherOSs(e.g.,DOSFDISK,OS/2FDISK)Warning:invalidflag0x0000ofpartitiontable4willbecorrectedbyw(rite)Command(mforhelp):nCommandactioneextendedpprimarypartition(1-4)pPartitionnumber(1-4):1Firstcylinder(1-2088,default1):Usingdefaultvalue1Lastcylinder,+cylindersor+size{K,M,G}(1-2088,default2088):Usingdefaultvalue2088Command(mforhelp):wThepartitiontablehasbeenaltered!Callingioctl()tore-readpartitiontable.Syncingdisks.rac1:~#/etc//oracleasmconfigureConfiguringtheOracleASMlibrarydriver.Thiswillconfiguretheon-bootpropertiesoftheOracleASMlibrarydriver.Thefollowingquestionswilldeterminewhetherthedriverisloadedonbootandwhatpermissionsitwillhave.Thecurrentvalueswillbeshowninbrackets('[]').Hitting<ENTER>withouttypingananswerwillkeepthatcurrentvalue.Ctrl-Cwillabort.Defaultusertoownthedriverinterface[]:gridDefaultgrouptoownthedriverinterface[]:asmadminStartOracleASMlibrarydriveronboot(y/n)[n]:yScanforOracleASMdisksonboot(y/n)[y]:yWritingOracleASMlibrarydriverconfiguration:doneInitializingtheOracleASMLibdriver:doneScanningthesystemforOracleASMLibdisks:donerac1:~#oracleasmcreatediskVOL1/dev/sdb1Writingdiskheader:doneInstantiatingdisk:donerac1:~#oracleasmcreatediskVOL2/dev/sdc1Writingdiskheader:doneInstantiatingdisk:donerac1:~#oracleasmlistdisksVOL1VOL2rac2:/usr/sbin#oracleasmscandisksReloadingdiskpartitions:doneCleaninganystaleASMdisks...ScanningsystemforASMdisks...Instantiatingdisk"VOL1"Instantiatingdisk"VOL2"rac2:/usr/sbin#oracleasmlistdisksVOL1VOL2双机建立信任rac1:~#su-gridgrid@rac1:~>ssh-keygen-trsaGeneratingpublic/privatersakeypair.Enterfileinwhichtosavethekey(/home/grid/.ssh/id_rsa):Createddirectory'/home/grid/.ssh'.Enterpassphrase(emptyfornopassphrase):Entersamepassphraseagain:Youridentificationhasbeensavedin/home/grid/.ssh/id_rsa.Yourpublickeyhasbeensavedin/home/grid/.ssh/id_rsa.pub.Thekeyfingerprintis:2e:db:59:6c:9e:de:c7:86:46:bd:b0:ff:71:17:50:5egrid@rac1Thekey'srandomartimageis:+--[RSA2048]----+|.E||o.||..||.||S..||..o..||..+.=oo||+=o+=+||.o.+..+...|grid@rac1:~/.ssh>catid_rsa.pub>authorized_keysgrid@rac1:~/.ssh>sshrac2cat~/.ssh/id_rsa.pub>>authorized_keysTheauthenticityofhost'rac2(33)'can'tbeestablished.RSAkeyfingerprintisb8:92:26:31:fe:f1:83:7f:a1:3a:cf:7c:55:40:52:a5.Areyousureyouwanttocontinueconnecting(yes/no)?yesWarning:Permanentlyadded'rac2,33'(RSA)tothelistofknownhosts.Password:grid@rac1:~/.ssh>scpauthorized_keysrac2:~/.ssh/.Password:authorized_keysTheauthenticityofhost'rac2(33)'can'tbeestablished.RSAkeyfingerprintisb8:92:26:31:fe:f1:83:7f:a1:3a:cf:7c:55:40:52:a5.Areyousureyouwanttocontinueconnecting(yes/no)?yesWarning:Permanentlyadded'rac2,33'(RSA)tothelistofknownhosts.TueApr1012:13:28CST2012grid@rac2:/home/grid/.ssh>sshrac1-privdateTheauthenticityofhost'rac1-priv()'can'tbeestablished.RSAkeyfingerprintisb8:92:26:31:fe:f1:83:7f:a1:3a:cf:7c:55:40:52:a5.Areyousureyouwanttocontinueconnecting(yes/no)?yesWarning:Permanentlyadded'rac1-priv,'(RSA)tothelistofknownhosts.TueApr1012:13:42CST2012grid@rac2:/home/grid/.ssh>sshrac2-privdateTheauthenticityofhost'rac2-priv()'can'tbeestablished.RSAkeyfingerprintisb8:92:26:31:fe:f1:83:7f:a1:3a:cf:7c:55:40:52:a5.Areyousureyouwanttocontinueconnecting(yes/no)?yesWarning:Permanentlyadded'rac2-priv,'(RSA)tothelistofknownhosts.TueApr1012:13:53CST2012(ORACLE用户建立同样的各节点信任关系)安装GRID#xhost+>>cd/home/oracle/soft/grid>./runInstaller选择skipsoftwareupdates,next选择AdvancedInstallation:#vi/etc/=2007748608=2097152-max-nr=1048576#rpm-ivh#rpm-ivhgcc-c++#rpm-ivhlibstdc#rpm-ivh#rpm–ivh/home/oracle/soft/grid/rpm/NetworkTimeProtocol(NTP)failed:(RAC1,RAC2)#Vi/etc/sysconfig/ntpNTPD_OPTIONS="-g-untp:ntp-x"#rcntprestartTaskIntegrityfailed:(RAC1,RAC2)nameservernameserver忽略,nextrac1:~#cd/oraclerac1:/oracle#cdapprac1:/oracle/app#cdoraInventory/rac1:/oracle/app/oraInventory#./orainstRoot.shChangingpermissionsof/oracle/app/oraInventory.Addingread,writepermissionsforgroup.Removingread,write,executepermissionsforworld.Changinggroupnameof/oracle/app/oraInventorytooinstall.Theexecutionofthescriptiscomplete.rac1:/oracle/app/oraInventory#cd..rac1:/oracle/app#cdgridPerformingrootuseroperationforOracle11gThefollowingenvironmentvariablesaresetas:ORACLE_OWNER=gridORACLE_HOME=/oracle/app/gridEnterthefullpathnameofthelocalbindirectory:[/usr/local/bin]:Copyingdbhometo/usr/local/bin...Copyingoraenvto/usr/local/bin...Copyingcoraenvto/usr/local/bin...Creating/etc/oratabfile...Entrieswillbeaddedtothe/etc/oratabfileasneededbyDatabaseConfigurationAssistantwhenadatabaseiscreatedFinishedrunninggenericpartofrootscript.Nowproduct-specificrootactionswillbeperformed.Usingconfigurationparameterfile:/oracle/app/grid/crs/install/crsconfig_paramsCreatingtracedirectoryUserignoredPrerequisitesduringinstallationOLRinitialization-successfulrootwalletrootwalletcertrootcertexportpeerwalletprofilereaderwalletpawalletpeerwalletkeyspawalletkeyspeercertrequestpacertrequestpeercertpacertpeerrootcertTPprofilereaderrootcertTPparootcertTPpeerpacertTPpapeercertTPprofilereaderpacertTPprofilereaderpeercertTPpeerusercertpausercertAddingClusterwareentriestoinittabCRS-2672:Attemptingtostart''on'rac1'CRS-2676:Startof''on'rac1'succeededCRS-2672:Attemptingtostart''on'rac1'CRS-2676:Startof''on'rac1'succeededCRS-2672:Attemptingtostart''on'rac1'CRS-2672:Attemptingtostart''on'rac1'CRS-2676:Startof''on'rac1'succeededCRS-2676:Startof''on'rac1'succeededCRS-2672:Attemptingtostart''on'rac1'CRS-2672:Attemptingtostart''on'rac1'CRS-2676:Startof''on'rac1'succeededCRS-2676:Startof''on'rac1'succeededASMcreatedandstartedsuccessfully.DiskGroupDGMGRcreatedsuccessfully.clscfg:-installmodespecifiedSuccessfullyaccumulatednecessaryOCRkeys.CreatingOCRkeysforuser'root',privgrp'root'..Operationsuccessful.CRS-4256:UpdatingtheprofileSuccessfuladditionofvotingdisk93ee939dcfa24fe2bf7df7705e6adfd8.Successfullyreplacedvotingdiskgroupwith+DGMGR.CRS-4256:UpdatingtheprofileCRS-4266:Votingfile(s)successfullyreplaced##STATEFileUniversalIdFileNameDiskgroup------------------------------------------1.ONLINE93ee939dcfa24fe2bf7df7705e6adfd8(ORCL:VOL1)[DGMGR]Located1votingdisk(s).CRS-2672:Attemptingtostart'ora.asm'on'rac1'CRS-2676:Startof'ora.asm'on'rac1'succeededCRS-2672:Attemptingtostart''on'rac1'CRS-2676:Startof''on'rac1'succeededConfigureOracleGridInfrastructureforaCluster...succeededrac1:/oracle/app/grid#rac2:/home/grid#cd/oracle/apprac2:/oracle/app#cdoraInventory/rac2:/oracle/app/oraInventory#./orainstRoot.shChangingpermissionsof/oracle/app/oraInventory.Addingread,writepermissionsforgroup.Removingread,write,executepermissionsforworld.Changinggroupnameof/oracle/app/oraInventorytooinstall.Theexecutionofthescriptiscomplete.rac2:/oracle/app/oraInventory#cd..rac2:/oracle/app#cdgridPerformingrootuseroperationforOracle11gThefollowingenvironmentvariablesaresetas:ORACLE_OWNER=gridORACLE_HOME=/oracle/app/gridEnterthefullpathnameofthelocalbindirectory:[/usr/local/bin]:Copyingdbhometo/usr/local/bin...Copyingoraenvto/usr/local/bin...Copyingcoraenvto/usr/local/bin...Creating/etc/oratabfile...Entrieswillbeaddedtothe/etc/oratabfileasneededbyDatabaseConfigurationAssistantwhenadatabaseiscreatedFinishedrunninggenericpartofrootscript.Nowproduct-specificrootactionswillbeperformed.Usingconfigurationparameterfile:/oracle/app/grid/crs/install/crsconfig_paramsCreatingtracedirectoryUserignoredPrerequisitesduringinstallationOLRinitialization-successfulAddingClusterwareentriestoinittabCRS-4402:TheCSSdaemonwasstartedinexclusivemodebutfoundanactiveCSSdaemononnoderac1,number1,andisterminatingAnactiveclusterwasfoundduringexclusivestartup,restartingtojointheclusterConfigureOracleGridInfrastructureforaCluster...succeeded如果需要重新运行root.sh,需要:/oracle/app/grid/crs-verbose-deconfig-forceGRID安装完毕。添加dg:#su-grid>exportORACLE_SID=+ASM1>sqlplus“/assysasm”Sql>creatediskgroupDATADGexternalredundancydisk'ORCL:VOL2';Sql>exit>exit安装DB:#xhost+#su–oracle>cd/home/oracle/soft>./runInstaller设置系统用户密码,指定DG关于ORA-12162Linux

1、启动ORACLE监听

首先要登录用户oracle:su-oracle

[oracle@localhost~]$cdproduct/10.2.0/db_1/bin/

--找到oracle安装bin下[oracle@localhostbin]$lsnrctl

--启动oracle监听命令

LSNRCTLforLinux:Version.0-Productionon29-OCT-201019:36:02

Copyright(c)1991,2005,Oracle.Allrightsreserved.

WelcometoLSNRCTL,type"help"forinformation.

LSNRCTL>help

--查看lsnrctl有哪些参数

ThefollowingoperationsareavailableAnasterisk(*)denotesamodifierorextendedcommand:

start

stop

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论