Solaris 10(x86)构建Oracle 10g RAC之--配置系统环境(1)
Solaris 10(x86)构建Oracle 10g RAC之--配置系统环境(1)
系统环境:
操作系统:Solaris 10(x86-64)
Cluster: Oracle CRS 10.2.0.1.0
Oracle: Oracle 10.2.0.1.0
如图所示:RAC 系统架构
本案例,通过Solairs 10(x86-64)系统,构建Oracle 10g 的RAC;共享存储采用RAW+ASM的方式进行管理。
一、操作系统环境
[root@node1:/]# uname -a
SunOS node1 5.10 Generic_142910-17 i86pc i386 i86pc
[root@node1:/]# isainfo -kv
64-bit amd64 kernel modules
1、网络配置(在所有节点)
[root@node1:/]#cat/etc/inet/ipnodes##Internethosttable#::1localhost127.0.0.1localhost192.168.8.11node1loghost192.168.8.13node1-vip10.10.10.11node1-priv192.168.8.12node2192.168.8.14node2-vip10.10.10.12node2-priv
网络配置:
配置vipnetwork(node1):[root@node1:/]#ifconfige1000g0:1plumbup[root@node1:/]#ifconfige1000g0:1192.168.8.13netmask255.255.255.0[root@node1:/]#ifconfig-alo0:flags=2001000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL>mtu8232index1inet127.0.0.1netmaskff000000e1000g0:flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4>mtu1500index2inet192.168.8.11netmaskffffff00broadcast192.168.8.255ether8:0:27:28:b1:8ce1000g0:1:flags=4001000842<BROADCAST,RUNNING,MULTICAST,IPv4,DUPLICATE>mtu1500index2inet192.168.8.13netmaskffffff00broadcast192.168.8.255e1000g1:flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4>mtu1500index3inet10.10.10.11netmaskffffff00broadcast10.10.10.255ether8:0:27:6e:16:1配置vipnetwork(node2):[root@node2:/]#ifconfige1000g0:1plumbup[root@node2:/]#ifconfige1000g0:1192.168.8.14netmask255.255.255.0[root@node2:/]#ifconfig-alo0:flags=2001000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL>mtu8232index1inet127.0.0.1netmaskff000000e1000g0:flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4>mtu1500index2inet192.168.8.12netmaskffffff00broadcast192.168.8.255ether8:0:27:1f:bf:4ce1000g0:1:flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4>mtu1500index2inet192.168.8.14netmaskffffff00broadcast192.168.8.255e1000g1:flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4>mtu1500index3inet10.10.10.12netmaskffffff00broadcast10.10.10.255ether8:0:27:a5:2c:db
2、共享磁盘配置(在所有节点)
对于Oracle 10g RAC,OCR和VOTE DISK、DataBase需建立在共享存储设备上;OCR和VOTE DISK必须以raw的方式管理,而存放DataBase的磁盘必须以ASM的方式管理。
1、建立磁盘分区(raw)(在node1)
在Solaris下建立raw应注意以下事项:UsethefdiskcommandtocreateaSolarispartitiononthediskifonedoesnotalreadyexist.Solarisfdiskpartitionsmuststartatcylinder1,notcylinder0.Ifyoucreateanfdiskpartition,thenyoumustlabelthediskbeforecontinuing.Enterthepartitioncommand,followedbytheprintcommandtodisplaythepartitiontableforthediskthatyouwanttouse.Ifnecessary,createasinglewhole-diskslice,startingatcylinder1.Note:TopreventAutomaticStorageManagementfromoverwritingthepartitiontable,youcannotuseslicesthatstartatcylinder0(forexample,slice2).注意:在建立磁盘分区时,必须从cylinder1开始,不能从cylinder0开始!建立磁盘分区[root@node1:/]#formatSearchingfordisks...doneAVAILABLEDISKSELECTIONS:0.c0t0d0<DEFAULTcyl2607alt2hd255sec63>/pci@0,0/pci8086,2829@d/disk@0,01.c0t2d0<DEFAULTcyl2608alt2hd255sec63>/pci@0,0/pci8086,2829@d/disk@2,0Specifydisk(enteritsnumber):1selectingc0t2d0[diskformatted]format>pWARNING-Thisdiskmaybeinusebyanapplicationthathasmodifiedthefdisktable.Ensurethatthisdiskisnotcurrentlyinusebeforeproceedingtousefdisk.format>fdiskNofdisktableexists.Thedefaultpartitionforthediskis:a100%"SOLARISSystem"partitionType"y"toacceptthedefaultpartition,otherwisetype"n"toeditthepartitiontable.yformat>pPARTITIONMENU:0-change`0'partition1-change`1'partition2-change`2'partition3-change`3'partition4-change`4'partition5-change`5'partition6-change`6'partition7-change`7'partitionselect-selectapredefinedtablemodify-modifyapredefinedpartitiontablename-namethecurrenttableprint-displaythecurrenttablelabel-writepartitionmapandlabeltothedisk!<cmd>-execute<cmd>,thenreturnquitpartition>pCurrentpartitiontable(original):Totaldiskcylindersavailable:2607+2(reservedcylinders)PartTagFlagCylindersSizeBlocks0unassignedwm00(0/0/0)01unassignedwm00(0/0/0)02backupwu0-260619.97GB(2607/0/0)418814553unassignedwm00(0/0/0)04unassignedwm00(0/0/0)05unassignedwm00(0/0/0)06unassignedwm00(0/0/0)07unassignedwm00(0/0/0)08bootwu0-07.84MB(1/0/0)160659unassignedwm00(0/0/0)0partition>0PartTagFlagCylindersSizeBlocks0unassignedwm0-16133.35MB(17/0/0)273105Enterpartitionidtag[unassigned]:Enterpartitionpermissionflags[wm]:Enternewstartingcyl[0]:1Enterpartitionsize[273105b,17c,17e,133.35mb,0.13gb]:128mbpartition>1PartTagFlagCylindersSizeBlocks1unassignedwm0-16133.35MB(17/0/0)273105Enterpartitionidtag[unassigned]:Enterpartitionpermissionflags[wm]:Enternewstartingcyl[0]:18Enterpartitionsize[273105b,17c,34e,133.35mb,0.13gb]:128mbpartition>3PartTagFlagCylindersSizeBlocks3unassignedwm0-6525.00GB(653/0/0)10490445Enterpartitionidtag[unassigned]:Enterpartitionpermissionflags[wm]:Enternewstartingcyl[0]:35Enterpartitionsize[10490445b,653c,687e,5122.29mb,5.00gb]:5gbpartition>4PartTagFlagCylindersSizeBlocks4unassignedwm0-6525.00GB(653/0/0)10490445Enterpartitionidtag[unassigned]:Enterpartitionpermissionflags[wm]:Enternewstartingcyl[0]:688Enterpartitionsize[10490445b,653c,1340e,5122.29mb,5.00gb]:5gbpartition>6PartTagFlagCylindersSizeBlocks6unassignedwm0-5224.01GB(523/0/0)8401995Enterpartitionidtag[unassigned]:Enterpartitionpermissionflags[wm]:Enternewstartingcyl[0]:689Enterpartitionsize[8401995b,523c,1211e,4102.54mb,4.01gb]:4gbpartition>7PartTagFlagCylindersSizeBlocks7unassignedwm0-5224.01GB(523/0/0)8401995Enterpartitionidtag[unassigned]:Enterpartitionpermissionflags[wm]:Enternewstartingcyl[0]:1212Enterpartitionsize[8401995b,523c,1734e,4102.54mb,4.01gb]:4gbpartition>pCurrentpartitiontable(unnamed):Totaldiskcylindersavailable:2607+2(reservedcylinders)PartTagFlagCylindersSizeBlocks0unassignedwm1-17133.35MB(17/0/0)2731051unassignedwm18-34133.35MB(17/0/0)2731052backupwu0-260619.97GB(2607/0/0)418814553unassignedwm35-6875.00GB(653/0/0)104904454unassignedwm688-13405.00GB(653/0/0)104904455unassignedwm00(0/0/0)06unassignedwm689-12114.01GB(523/0/0)84019957unassignedwm1212-17344.01GB(523/0/0)84019958bootwu0-07.84MB(1/0/0)160659unassignedwm00(0/0/0)0partition>labelReadytolabeldisk,continue?ypartition>partition>quitformat>verifyPrimarylabelcontents:Volumename=<>asciiname=<DEFAULTcyl2607alt2hd255sec63>pcyl=2609ncyl=2607acyl=2bcyl=0nhead=255nsect=63PartTagFlagCylindersSizeBlocks0unassignedwm1-17133.35MB(17/0/0)2731051unassignedwm18-34133.35MB(17/0/0)2731052backupwu0-260619.97GB(2607/0/0)418814553unassignedwm35-6875.00GB(653/0/0)104904454unassignedwm688-13405.00GB(653/0/0)104904455unassignedwm00(0/0/0)06unassignedwm689-12114.01GB(523/0/0)84019957unassignedwm1212-17344.01GB(523/0/0)84019958bootwu0-07.84MB(1/0/0)160659unassignedwm00(0/0/0)0format>savePleasenamethispartitiontypebeforesavingitformat>quit查看raw设备:[root@node1:/]#ls-l/dev/rdsk/c0t2d0s*lrwxrwxrwx1rootroot51Jan2015:18/dev/rdsk/c0t2d0s0->../../devices/pci@0,0/pci8086,2829@d/disk@2,0:a,rawlrwxrwxrwx1rootroot51Jan2015:18/dev/rdsk/c0t2d0s1->../../devices/pci@0,0/pci8086,2829@d/disk@2,0:b,rawlrwxrwxrwx1rootroot51Jan2015:18/dev/rdsk/c0t2d0s2->../../devices/pci@0,0/pci8086,2829@d/disk@2,0:c,rawlrwxrwxrwx1rootroot51Jan2015:18/dev/rdsk/c0t2d0s3->../../devices/pci@0,0/pci8086,2829@d/disk@2,0:d,rawlrwxrwxrwx1rootroot51Jan2015:18/dev/rdsk/c0t2d0s4->../../devices/pci@0,0/pci8086,2829@d/disk@2,0:e,rawlrwxrwxrwx1rootroot51Jan2015:18/dev/rdsk/c0t2d0s5->../../devices/pci@0,0/pci8086,2829@d/disk@2,0:f,rawlrwxrwxrwx1rootroot51Jan2015:18/dev/rdsk/c0t2d0s6->../../devices/pci@0,0/pci8086,2829@d/disk@2,0:g,rawlrwxrwxrwx1rootroot51Jan2015:18/dev/rdsk/c0t2d0s7->../../devices/pci@0,0/pci8086,2829@d/disk@2,0:h,raw......在node2上查看:[root@node2:/]#formatSearchingfordisks...doneAVAILABLEDISKSELECTIONS:0.c0t0d0<DEFAULTcyl2607alt2hd255sec63>/pci@0,0/pci8086,2829@d/disk@0,01.c0t2d0<DEFAULTcyl2607alt2hd255sec63>/pci@0,0/pci8086,2829@d/disk@2,0Specifydisk(enteritsnumber):1selectingc0t2d0[diskformatted]partition>pCurrentpartitiontable(original):Totaldiskcylindersavailable:2607+2(reservedcylinders)PartTagFlagCylindersSizeBlocks0unassignedwm1-17133.35MB(17/0/0)2731051unassignedwm18-34133.35MB(17/0/0)2731052backupwu0-260619.97GB(2607/0/0)418814553unassignedwm35-6875.00GB(653/0/0)104904454unassignedwm688-13405.00GB(653/0/0)104904455unassignedwm00(0/0/0)06unassignedwm689-12114.01GB(523/0/0)84019957unassignedwm1212-17344.01GB(523/0/0)84019958bootwu0-07.84MB(1/0/0)160659unassignedwm00(0/0/0)0
2、修改raw设备属性(所有node)
修改raw属性(所有node):[root@node1:/]#chownoracle:dba/dev/rdsk/c0t2d0s*[root@node1:/]#chmod660/dev/rdsk/c0t2d0s*[root@node1:/]#ls-l/devices/pci@0,0/pci8086,2829@d/disk@2,0:e,rawcrw-rw----1oracledba30,132Jan2110:35/devices/pci@0,0/pci8086,2829@d/disk@2,0:e,raw[root@node1:/]#建立OCR和VOTE磁盘链接(所有node):[root@node1:/]#mkdir/oracle[root@node1:/]#chownoracle:dba/oracle[root@node1:/]#su-oracleOracleCorporationSunOS5.10GenericPatchJanuary2005[oracle@node1:/export/home/oracle]$cd/oracle[oracle@node1:/oracle]$ln-s/devices/pci@0,0/pci8086,2829@d/disk@2,0:a,rawocr[oracle@node1:/oracle]$ln-s/devices/pci@0,0/pci8086,2829@d/disk@2,0:b,rawvote[oracle@node1:/oracle]$ls-ltotal4lrwxrwxrwx1oracleoinstall46Jan2111:11ocr->/devices/pci@0,0/pci8086,2829@d/disk@2,0:a,rawlrwxrwxrwx1oracleoinstall46Jan2111:11vote->/devices/pci@0,0/pci8086,2829@d/disk@2,0:b,raw
3、建立Oracle用户和组(所有node):
[root@node1:/]#groupadd-g200oinstall[root@node1:/]#groupadd-g205dba[root@node1:/]#useradd-u200-goinstall-Gdba-d/export/home/oracle-m-s/usr/bin/bashoracle64blocks[root@node1:/]#idoracleuid=200(oracle)gid=200(oinstall)[root@node1:/]#su-oracleOracleCorporationSunOS5.10GenericPatchJanuary2005[oracle@node1:/export/home/oracle]$pwd/export/home/oracle[root@node1:/]#passwdoraclepasswd:passwordsuccessfullychangedfororacle建立CRS和Oracle软件安装目录:[root@node1:/]#mkdir/export/home/ora10[root@node1:/]#chown-Roracle:dba/export/home/ora10[root@node1:/]#mkdir-p/export/home/crs_1[root@node1:/]#chown-Roracle:dba/export/home/crs_1配置Oracle用户环境变量:[oracle@node1:/export/home/oracle]$cat.profile#Thisisthedefaultstandardprofileprovidedtoauser.#Theyareexpectedtoeditittomeettheirownneeds.MAIL=/usr/mail/${LOGNAME:?}ORACLE_BASE=/export/home/ora10ORACLE_HOME=$ORACLE_BASE/product/10.2.0/db_1ORACLE_CRS_HOME=/export/home/crs_1ORACLE_SID=prod1;;ORACLE_SID=prod2(node2)PATH=$PATH:/usr/ccs/bin:/usr/local/bin:/usr/local/sbin:$ORACLE_HOME/binexportORACLE_BASEORACLE_HOMEORACLE_SIDPATHORACLE_CRS_HOME确认nobody用户:[root@node1:/]#idnobodyuid=60001(nobody)gid=60001(nobody)
4、配置内核参数(所有node):
[root@node1:/]#cat/etc/systemsetsemsys:seminfo_semmni=100setsemsys:seminfo_semmns=1024setsemsys:seminfo_semmsl=256setsemsys:seminfo_semvmx=32767setshmsys:shminfo_shmmax=4294967295setshmsys:shminfo_shmmni=100
5、检查软件包的安装(所有node):
1、检查系统所需的软件包:[root@node2:/]#pkginfo-iSUNWarcSUNWbtoolSUNWheaSUNWlibmSUNWlibmsSUNWsprotSUNWtooSUNWi1ofSUNWi1csSUNWi15csSUNWxwfntsystemSUNWarcLintLibraries(usr)systemSUNWbtoolCCStoolsbundledwithSunOSsystemSUNWheaSunOSHeaderFilessystemSUNWi1ofISO-8859-1(Latin-1)OptionalFontssystemSUNWlibmMath&MicrotaskingLibraryHeaders&LintFiles(Usr)systemSUNWlibmsMath&MicrotaskingLibraries(Usr)systemSUNWsprotSolarisBundledtoolssystemSUNWtooProgrammingToolssystemSUNWxwfntXWindowSystemplatformrequiredfontsERROR:informationfor"SUNWi1cs"wasnotfoundERROR:informationfor"SUNWi15cs"wasnotfound安装软件包(挂载Solaris系统盘):[oracle@node1:/export/home/oracle]$su-Password:OracleCorporationSunOS5.10GenericPatchJanuary2005[root@node1:/]#ls/cdromcdrom0sol_10_910_x86[root@node1:/cdrom/sol_10_910_x86/Solaris_10/Product]#pwd/cdrom/sol_10_910_x86/Solaris_10/Product安装软件:[root@node1:/cdrom/sol_10_910_x86/Solaris_10/Product]#pkgadd-d/cdrom/sol_10_910_x86/Solaris_10/ProductSUNWi1csProcessingpackageinstance<SUNWi1cs>from</cdrom/sol_10_910_x86/Solaris_10/Product>X11ISO8859-1CodesetSupport(i386)2.0,REV=2004.10.17.15.04Copyright2004SunMicrosystems,Inc.Allrightsreserved.Useissubjecttolicenseterms.Using</>asthepackagebasedirectory.##Processingpackageinformation.##Processingsysteminformation.8packagepathnamesarealreadyproperlyinstalled.##Verifyingpackagedependencies.##Verifyingdiskspacerequirements.##Checkingforconflictswithpackagesalreadyinstalled.##Checkingforsetuid/setgidprograms.Thispackagecontainsscriptswhichwillbeexecutedwithsuper-userpermissionduringtheprocessofinstallingthispackage.Doyouwanttocontinuewiththeinstallationof<SUNWi1cs>[y,n,?]yInstallingX11ISO8859-1CodesetSupportas<SUNWi1cs>##Installingpart1of1.232blocksInstallationof<SUNWi1cs>wassuccessful.[root@node1:/cdrom/sol_10_910_x86/Solaris_10/Product]#pkgadd-d/cdrom/sol_10_910_x86/Solaris_10/ProductSUNWi15csProcessingpackageinstance<SUNWi15cs>from</cdrom/sol_10_910_x86/Solaris_10/Product>X11ISO8859-15CodesetSupport(i386)2.0,REV=2004.10.17.15.04Copyright2004SunMicrosystems,Inc.Allrightsreserved.Useissubjecttolicenseterms.Using</>asthepackagebasedirectory.##Processingpackageinformation.##Processingsysteminformation.6packagepathnamesarealreadyproperlyinstalled.##Verifyingpackagedependencies.##Verifyingdiskspacerequirements.##Checkingforconflictswithpackagesalreadyinstalled.##Checkingforsetuid/setgidprograms.Thispackagecontainsscriptswhichwillbeexecutedwithsuper-userpermissionduringtheprocessofinstallingthispackage.Doyouwanttocontinuewiththeinstallationof<SUNWi15cs>[y,n,?]yInstallingX11ISO8859-15CodesetSupportas<SUNWi15cs>##Installingpart1of1.1460blocksInstallationof<SUNWi15cs>wassuccessful.再次检查软件:[root@node2:/]#pkginfo-iSUNWi1csSUNWi15cssystemSUNWi15csX11ISO8859-15CodesetSupportsystemSUNWi1csX11ISO8859-1CodesetSupport
---未完,待续。。。
声明:本站所有文章资源内容,如无特殊说明或标注,均为采集网络资源。如若本站内容侵犯了原著者的合法权益,可联系本站删除。