oracle-12c-r2-RAC配置手册

整理文档很辛苦,赏杯茶钱您下走!

免费阅读已结束,点击下载阅读编辑剩下 ...

阅读已结束,您可以下载文档离线阅读编辑

资源描述

ORACLE12CR2RealApplicationClusterInstallationGuide朱海清StarTimesSoftwareTechnologyCo.,LtdASM磁盘空间最低要求12CR2相比前一版本,OCR的磁盘占用需求有了明显增长。为了方便操作,设置如下:External:1个卷x40GNormal:3个卷x30GHight:5个卷x25GFlex:3个卷x30GOCR+VOLTING+MGMT存储通常放到一个磁盘组,且选择Normal的冗余方式,也即最少3块asm磁盘80G空间。操作系统安装操作系统安装时把“ServerwithGUI“和”CompatibilityLibraries”勾上,其他都不用选择。版本采用CentOS7、RHEL7或者OracleLinux7安装oracle预安装包yuminstall-yoracle-rdbms-server-12cR1-preinstall创建用户和组oracle用户和dba、oinstall组已经在上一步创建完毕。rac所有节点的oracle用户和grid用户的uid和gid必须一致,所以创建的时候最好制定uid和gid。groupadd--gid54323asmdbagroupadd--gid54324asmopergroupadd--gid54325asmadmingroupadd--gid54326opergroupadd--gid54327backupdbagroupadd--gid54328dgdbagroupadd--gid54329kmdbausermod--uid54321--gidoinstall--groupsdba,oper,asmdba,asmoper,backupdba,dgdba,kmdbaoracleuseradd--uid54322--gidoinstall--groupsdba,asmadmin,asmdba,asmopergrid安装目录mkdir-p/u01/app/12.2.0/gridmkdir-p/u01/app/gridmkdir-p/u01/app/oraclechown-Rgrid:oinstall/u01chownoracle:oinstall/u01/app/oraclechmod-R775/u01/用户环境变量grid环境变量catEOF/home/grid/.bash_profileORACLE_SID=+ASM1ORACLE_HOME=/u01/12.2.0/gridPATH=$ORACLE_HOME/bin:$PATHLD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/libCLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlibexportORACLE_SIDCLASSPATHORACLE_HOMELD_LIBRARY_PATHPATHEOF在节点2,ORACLE_SID=+ASM2oracle环境变量catEOF/home/oracle/.bash_profileORACLE_SID=starboss1ORACLE_HOME=/u01/app/oracle/product/12.2.0/db_1ORACLE_HOSTNAME=rac01PATH=$ORACLE_HOME/bin:$PATHLD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/libCLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlibexportORACLE_SIDORACLE_HOMEORACLE_HOSTNAMEPATHLD_LIBRARY_PATHCLASSPATHEOF在节点2,ORACLE_SID=starboss2,ORACLE_HOSTNAME=rac02修改logind.conf#vi/etc/systemd/logind.confRemoveIPC=no#systemctldaemon-reload#systemctlrestartsystemcd-logind加载pam_limits.so模块echosessionrequiredpam_limits.so/etc/pam.d/login禁用selinuxsetenforce0vi/etc/sysconfig/selinux禁用防火墙#systemctlstopfirewalld&&systemctldisablefirewalld修改ulimitcatEOF/etc/security/limits.d/99-grid-oracle-limits.conforaclesoftnproc16384oraclehardnproc16384oraclesoftnofile1024oraclehardnofile65536oraclesoftstack10240oraclehardstack32768gridsoftnproc16384gridhardnproc16384gridsoftnofile1024gridhardnofile65536gridsoftstack10240gridhardstack32768EOF创建自定义的ulimitcatEOF/etc/profile.d/oracle-grid.shif[$USER=oracle];thenif[$SHELL=/bin/ksh];thenulimit-u16384ulimit-n65536elseulimit-u16384-n65536fifiif[$USER=grid];thenif[$SHELL=/bin/ksh];thenulimit-u16384ulimit-n65536elseulimit-u16384-n65536fifiEOF修改共享内存分区大小将如下参数添加到/etc/fstab,具体大小数值根据实际情况调整,因为这个数值和物理内存以及MEMORY_TARGET有关。echo“shm/dev/shmtmpfssize=12g00”/etc/fstab修改后,只需重新对shm进行挂载即可:mount-oremount/dev/shm多路径#yuminstalldevice-mapper-multipath#cp/usr/share/doc/device-mapper-multipath-0.4.9/multipath.conf/etc/获取scsiid#/usr/lib/udev/scsi_id--whitelisted--replace-whitespace–-device=/dev/sda#vi/etc/multipath.confmultipaths{multipath{wwid36000d310012522000000000000000006aliasvol01}multipath{wwid36000d310012522000000000000000005aliasvol02}}#systemctlstartmultipathd.service#multipath-ll配置磁盘ASMlib方式安装ASMLibOracleLinux7yuminstall-ykmod-oracleasmCentOS7yuminstall-y://download.oracle.com/otn_software/asmlib/oracleasmlib-2.0.12-1.el7.x86_64.rpmyuminstall-y其他版本下载:磁盘配置12CR2中对磁盘组空间要求比12CR1更大。[root@rac01~]#/etc/init.d/oracleasmconfigure-iConfiguringtheOracleASMlibrarydriver.Thiswillconfiguretheon-bootpropertiesoftheOracleASMlibrarydriver.Thefollowingquestionswilldeterminewhetherthedriverisloadedonbootandwhatpermissionsitwillhave.Thecurrentvalueswillbeshowninbrackets('[]').HittingENTERwithouttypingananswerwillkeepthatcurrentvalue.Ctrl-Cwillabort.Defaultusertoownthedriverinterface[]:gridDefaultgrouptoownthedriverinterface[]:asmadminStartOracleASMlibrarydriveronboot(y/n)[n]:yScanforOracleASMdisksonboot(y/n)[y]:yWritingOracleASMlibrarydriverconfiguration:doneInitializingtheOracleASMLibdriver:[OK]ScanningthesystemforOracleASMLibdisks:[OK][root@rac01~]#reboot用fdisk在共享磁盘上创建主分区:[root@rac01~]#fdisk/dev/sddWelcometofdisk(util-linux2.23.2).Changeswillremaininmemoryonly,untilyoudecidetowritethem.Becarefulbeforeusingthewritecommand.DevicedoesnotcontainarecognizedpartitiontableBuildinganewDOSdisklabelwithdiskidentifier0x86f899a0.Command(mforhelp):nPartitiontype:pprimary(0primary,0extended,4free)eextendedSelect(defaultp):pPartitionnumber(1-4,default1):Firstsector(2048-39976959,default2048):Usingdefaultvalue2048Lastsector,+sectorsor+size{K,M,G}(2048-39976959,default39976959):Usingdefaultvalue39976959Partition1oftypeLinuxandofsize19.1GiBissetCommand(mforhelp):wThepartitiontablehasbeenaltered!Callingioctl()tore-readpartitiontable.Syncingdisks.在集群的任意节点创建asm磁盘:[root@rac01~]#/etc/init.d/oracleasmcreatediskOCR01/dev/sdd1Ma

1 / 58
下载文档,编辑使用

©2015-2020 m.777doc.com 三七文档.

备案号:鲁ICP备2024069028号-1 客服联系 QQ:2149211541

×
保存成功