Oracle12cR1RACfororaclelinux64X86_64install(doc 44页).docx
Orac1.e12cR1.RACforOraCIe1.inux6.4X86_64insta1.1.物理机能置:Corei3CPU(64位、YT技术支持即可),Win7X8664位系统(64位系统即可),6G内存(全安装完后,内存利用率为95%),300G硬盘虚拟机配置(1.2机同配):1CPU,2.5G内存,50G硬盘,双网卡软件:Virtua1.Box4.3.8,Orac1.e1.inux6.4X86_64,Orac1.e12CR1.X8664(包含四个文件),OraCICaSm驱动(包含一个文件,X8664),详见下面:-CW-I-K-.1rootroot1750478910Mov1316:231.1.BuxandM_12c_gr1.(i_1.ot2.zip-OT-r-E-.1rootroot201673595Dov1316:02IinUXanU412cgrid2of2.ziprw-r-r-.1rootroot1361028723Nov1314:421.i»uxajnd64_1.Jc_databasc_1.ofi.zip-rv-x:-r.1ootoot1116527103Nov1314:261.inuxdn1.6412cdatdbaice2of2.zip-nr-r-r-.1rootroot13300Feb2414:03Orac1.easm1.ib2.1.41.e1.6.xS6M.rpn安装OraCIe1.inUX6.4系统,安装时选择Drskicp,因为要用OraC1.e12c图形安装,防止麻烦,具体安装包如下:BaseSystem>BaseBaSeSystem>Compatibi1.i1.yIibrarieSBaseSystem>Hardwaremonitoringuti1.itiesBaseSystem>1.argeSystemsPerformanceBaseSystem>Networkc1.ientBaseSystem>PerformanceToo1.sBaseSystem>Per1.SupportBaseSystem>JavaP1.atformServers>ServerP1.atformServers>Systemadministrationtoo1.sServers>orac1.e-rdbms-server-11.gR2-Servers>orac1.easm-support-Desktops>DesktopDesktops>DesktopP1.atformDesktops>FontsDesktops>Genera1.PurposeDesktopDesktops>Graphica1.AdministrationToo1.sDesktops>InputMethodsDesktops>WindowSystemApp1.icationsInternetBrowserDeve1.opmentAdditiona1.Deve1.opmentDeve1.opmentDeve1.opmentToo1.s检测硬件环境:grepMemTota1.procmeninfo内存4GgrepSprocmeminfo交换分区>2.5Gdf-mtmptmp目录空闲区>2Gfree有看可用内存和交换空间df-m硬盘空闲空间>30GUname-m;unane-a也看系统提醒架构cat/etc/orac1e-re1ease;Isbre1.ease-id查看系统发行版本一、orac1.eIinux6yu三效劳叁的搭食备份etcyum.repos,d/下其他repo文件mountdevcdrommntrm-ivhCreaterepo_0.9.9-17.e1.6.noarch,rpmde1.tarpm-3.5-0.5.20090913git.e1.6.x86_64.rpmpython-de1.tarpm-3.5-0.5.20090913git.e1.6.x86_64.rpm然后建立以下内容1。Ca1.reP。文件Servernane=Serverbaseur1.=Servergpgchock_0enab1.ed=!gpgkey=/RPM-GPG-KEY-orac1e然后yumc1.eana1.1.然后就可以yum-yinsta1.1T二、依总包yminsta1.1.binuti1.s-yyuminsta1.1compat-1.ibcap1.-yyumins1.a1.1ComPa1.TibStdC+-33-yyuminsta1.1compat-1.ibstdc+-33.i686yuminsta1.1gcc-yyuminsta1.1.gcc-c+-yyuminsta1.1g1.ibc-yyuminsta1.1g1.ibc.i686-yyuminsta1.1.g1.ibc-deve1.-yyuminsta1.1g1.ibc-deve1.i686-yyuminsta1.1.ksh-yyuminsta1.1Iibgcc-yyuminsta1.11ibgcc.i686-yyumins1.a1.1Iibstdc+-yyuminsta1.11ibstdc+.i686-yyuminsta1.11.ibstdc+-deve1.-yyminsta1.1.1.ibstdc+-deve1.i686-yyuminsta1.IIibaio-yyuminsta1.1.IibaiO.i686-yyminsta1.11.ibaio-deve1.-yyuminsta1.1Iibaio-d。Ve1.i686-yyumins1.a1.IIibXex1.-yyuminsta1.11ibXext.i686-yyu11insta1.11ibXtst-yyuminsta1.1IibXtst.i686-yyuminsta1.IIibX1.1.-yyuminsta1.1.IibX1.1.i686-yyminsta1.1.IibXau-yyuminsta1.11ibXau.i686-yyuminsta1.1Iibxcb-yyuminsta1.1IibXCb.i686-yyminsta1.1.IibXi-yyuminsta1.1IibXi.i686-yyuminsta1.Imake-yyuminsta1.1sysstat-yyuminsta1.1unixODBC-yyuminsta1.1.UniXoDBC-deve1.binuti1.s-2.20.51.0.2-5.U.e1.6(x86.64)compat-1.ibcap1.-1.10-1(x8664)compat-1ibstdc+-33-3.2.3-69.e1.6(x8664)coinpat-jibstdc+-33-3.2.3-69.e16(i686)gcc-4.4.4-13,e1.6(x8664)gcc-c+-4.4.4-13.e1.6(x8664)g1.ibc-2.12-1.7.e1.6(i686)g1.ibc-2.12-1.7.e1.6(x86_64)g1.ibc-deve1.-2.12-1.7.e1.(x86.64)1.ibc-deve1.-2.12-1.7,e1.6(i686)ksh1.ibgcc-4.4.4-13.e1.6(1686)1.ibgcc-4.4.4-13.e1.6(x8664)1.ibstdc÷+-4.4.4-13.e1.6(x86_64)1.ibstdc÷+-4.4.4-13.e16(i686)1.ibstdc+-deve1.-4.4.4-13.e1.6(x86_64)1ibstdc+-deve1.-4.4.4-13.e1.6(i686)Iibaio-O.3.I07-!0.e1.6(x8664)1.ibaio-O.3.107-10.e1.6(i686)1.ibaio-deve1.-0.3.107-10.e1.6(x86_64)1.ibaio-deve1.-0.3.107-10.e1.6(i686)IibXext-I.1(x86_64)IibXext-I.1(i686)1.ibXtst-1.0.99.2(x8664)1.ibXtst-1.0.99.2(i686)1.ibX1.1.-1.3(x86_64)1.ibX1.1.-1.3(i686)1.ibXau-1.0.5(x8664)1.ibXau-1.0.5(i686)1ibxcb-1.5(x86_64)1.ibxcb-1.5(i686)1.ibXi-1.3(x8664)1.ibXi-1.3(i686)make-3.81-19.e1.6SySSIat-9.O.4T1.eI6(x86_64)检查软件包的安装root0orodata1.2C二#rpm-qaIgrep>inu1.iIsroot6oradata1.2C'#rpm-qa!grepcompatrootoradata1.2C'#rpm-qagrepgccroot0oradata1.2Crpm-qa(grepCompat-Iibstdc+rootQoradata1.2C'J#rpm-qaIgrepg1.ibcroot.0()ra(hta12C#rpmqaIgrepkshroo1.0oradata1.2Crpm-qaIgrepIibgccrootoradata1.2CFrpm-qagrepIibstdc+rooi0oradata1.2C二#rpm-qaIgrep1ibaiorootoradata1.2Crpm-qaIgrepIibXrootoradata1.2C二#rpm-qagrepIibXextroot0oradata1.2C二#rpm-qaIgrepIibXtstroot0oradata1.2C二#rpm-qaIgrepIibXextroo1.0oradata1.2C二#rpmqaIgrep1ibX1.strootQorada1.a12C二#rpm-qaigrepIibX1.1.rootoradata1.2Crpm-qaIgrepIibXauroot6oradata1.2C二#rpm-qagrepIibXirootoradata1.2CFrpm-qagrepIibxcbrootoradata1.2C、.#rpm-qagrepmakerootoradata1.2Crpm-qaIgrepsysstat三、内核参数(RAC时,01、02机相同)Yietcsysct1.confkerne1.shfnni=4096kerne1.,sem=25032000100128kerne1.,sIimnuix4398046511104kerne1.,shma1.1.=1073741824fs.net.iv4.ip_1.oca1._portr<mge=900065500net.core,rmemdefau1.t=262144net.core.Wmeindefau1.t=262144net.core.rmem_max=4194304net.core.Wmemmax=fs.aio-na-nr=1048576查看上面参数值:sbinsysct1.-agrep参数名使内核参数即时生效:sbinSySet1.-p四、设Jtgrid和OraC1.e用户SheI1.限制(RAC时,01、02机相同)Vietcsecurity1.imits.conf参加gridsoftnproc2047(确认左边参数#UIin1.iI-Su)gridgridhardsoftnproc16384(确认左边参数#UIimit-Hu)no(确认左边参数,UIimit-Sn)gridhardno(确认左边参数#U1.i1.nit-Hn)gridsoftstack10240(确认左边参数#UIimit-Ss)gridhardstack32768(确认左边参数#U1.imi1.-HS)orac1.esoftnproc2047orac1.ehardnproc16384orac1.esoftnoorac1.ehardnoorac1.esoftorac1.ehardstack10240stack32768vietcpam.d/Iogin参加(RAC时,01.02机相同)sessionrequired/1ib/security/pam1imits.so(X64系统用/1i1.>64SeCUritypamIimits.so)sessionrequiredpam_1.imits.soSsource/.bashProfiIe使环境变量生效解压zip包:unzip*.zip更改主机名:vi/etc/sysconfig/networkf1etchostsUostname=XXX.Com(最好是全域名)RAC时,etchosts(RAC时,01、02机相同)<IP-address><fU11y-quaIifiedmachine-name><machine-name>pub1.icethorac1.e02orac1.eOI-viporac1.e02-vip192.168.17.24orac1.c01-192.168.17.25orac1.e02-#PriVateeth1.172.16.17.14orac1.e01-orac1.e01-priv172.16.17.15orac1.e02-priv.hitzd.coinorac1.e02-priv#SCan192.168.17.8OraCIe-Sscanroot1.2c-vst-rac2'#catetcsecurity1.imits.d90-11proc.confftDefau1.t1.imitfornumberofuser'sprocessestoprevent#accidenta1.forkbombs.# Seerhbz#432903forreasoning.# -nproc16384rootsoftnprocun1.imitedYietcso1.inux/config注吞掉SEI,INUX=enforcing,再加上SE1.INUX=disab1.e使用以下命令重新启动*setenforcePermissive关闭防火墙:Chkconfig-1.istiptab1.esChkconfigiptab1.esoffChkconfig-IiS1.iptab1.es# serviceiptab1.esstop# chkconfigiptab1.esoff检查se1.inux和防火墙配置:ftgetenforce# serviceiptab1.esstatus# XhoSt+升exporiD1.SP1.AY=x.x.x.x:0.OXmanHger设置:XstartExecutionCommand选GNOME.见以下图:t=,VXstart时间同步协议NTPSE置(不建议使用NTP)或者停ntp时间同步servicentpdstopchkconfigntpdoffmvetcntp.conetcnt.conf.bak五、创立期和用户(RAC时.01、02机相同)节点1rootrac01'?groupadd-g54321Oinsta1.1.rootrac01'#groupadd-g54322dbarootOracO1.'#groupadd-g54323operrootrac01'=groupadd-g54324backupdbarootQracO1.'#grouj>ad<1.-g54325dgdbaroot6rac01'#groupadd-g54326kmdbarootrac01groupadd-g54327asmdbaErootQracO1.'Sgroupadd-g54328asmoperrootrac01、#groupadd-g54329asmadminroot6rac01'Jftuseradd-u12345-goinsta1.1.-Gdba,asmadmin,asmdba,asmopergridrootrac01'#useradd-U54321-goinsta1.1-Gdba,oper,backupdba,dgdba,kmdba,asmdba,asmadminorac1.e1.rootSracO1口#passedgridroot6rac01'#PaSSWdorac1.e六、创立相关目录(RAC时,01、02机相同)节点1#mkdir-pu1.app12.1.0/grid#mkdir-pu1.appgrid#mkdir#chmot1.-R775u1.-p01apporac1.e/product/12.1.O/db1&chown-Rgrid:oinsta1.1.ZuO1.#chown-ROraCIe:oinsta1.101apporac1.e七、设置环境交量节点1IgridQracO1.'$vi.bash_profi1.eexportTMP=ZtmpexportTMPDIR=ZtmpexportORAC1.EHOSTNAME=Orac1.e1.hitz<1.c<><nexportORAC1.EBSE=uO1appgridexportORAC1.EHOMEVuO1.app12.1.O/gridexportORAC1.ESII)=+SM1.exportPATH=$0RAC1.E_HOME/bin:$PATHexport1.D1.IBRARYPATH-SORC1.EJK)ME1ib:/1ib:usr1.ibexportC1.asspath=JORAC1.EHoMEJRE:$0RAC1.EH0MEj1.ibz50RC1.EHOME/rdbms/j1.ibexportDISP1.AY=:0.OUmaSk=022orac1.erac01'Svi.bashprofi1.eexportTMP=tmpexportTMPDIRtmpexportORAC1.EHOSTNAME=OexportORAC1.EJJWNAME=racdbexportORAC1.EBSE=uO1./app/orac1eexportORAC1.EH0ME=u01apporac1.eproduct12.1.O/db1exportORAC1.ESID=racdb1.exportPATH=$0RK1.EJioME/bin:$PATHexport1.D_1.IBRARYPATH=SORAC1.EHOME/1ib:/1ib:usr1.ibexportC1.ASSPATH=$0RAC1.EJIOME/JRE:SORAC1.EHOME/j1.ib:$ORAC1.E_HOME/rdbms/j1ibexportDISP1.AY=:0.0umask=022节点2gridrac02'$vi.bash_profiIeexportTMP=/impexportTMPDIR=tmpexportORAe1.EHOSTNAi1.E-OexportORAC1.EBASE=/u1/appgridexport0RAC1.E-H0ME=u01app12.1.0gridexportORAC1.ES1D=+SM2exportPATH=$0RM1.EHOMEZbin=JPATIIexport1.D1.IBRARYPATH-SORAC1.EJIOME1ib:/1ib:usr1.ibexportC1.ASSPTH=SORC1.EIIOMI:/JRE:$0RAC1.EHOME/j1.ib:$ORAC1.E_HOME/r<1.1.>ms/j1ibexportDISP1.W=:0.0umask-022orac1.erac02'Svi.bash_profi1.eexportTMP=ZtmjiexportTMPDIR=ZtmpexportORAC1.EHOSTNAME=OexportORAC1.E.UNQNAME=racdbexportORAC1.EBASE=/u1/apporac1eexportORAC1.EHOME=ZuO1/app/oracIeZproduct/12.1.O/db1exportORAC1.ESID=racdb2exportPATH=$ORAC1.E_HOME/bin:$PATHexport1.D1.IBRARYPATII-SORAC1.EHOME/1.ib:/1ib:usr1.ibexportC1.ASSPATH=$0RACIJ1.HoME/JRE:SORAC1.EHOME/j1.ib:$ORAC1.E_HOME/rdbms/j1ibexportD1.SP1.W=:0.0umask=022八、测试root6rac01、#pingrac1.roo1.rac01'#Pingrac1.-privroot0rac1.'#pingrac02rootrac01'#pingrac02-privrootrac02'#pingrac1.root6rac02'#pingrac1.-privrootrac02Pingrac02rootQrac02、#pingrac02-privdisk-1roo1.0orac1.e1.ttfdisk-1Diskdevsdd:10.5GB.10185760000bytes255heads,63sectors/track,1274cy1.inders1.nits=cy1.indersof16065»512=8225280bytesSectorsize(Iogica1.Zphysica1.):512bytes/512bytesI/Osize(minimum/optima1.):512bytes/512bytesDiskidentifier:0x50e5d5d9DeviceBootStartEndB1.ocksIdSystemdevsdd1.127410233373+831.inuxDiskdevsdb:5242MB,5242880000bytes255heads,63sectors/track,637cy1.indersUnits=cy1.indersof16065512=8225280bytesSectorsize(Iogica1.Zphysica1.):512bytes/512bytesI/Osize(minimum/optima1.):512bytes/512bytesDiskidentifier:0x37c21d87DeviceBootStartEndB1.ocksIdSystemdevsdb1.16375116671831.inuxDiskdevsdc:8388MB.8388608000bytes255heads,63sectors/track.1019cy1.inders1.nits=cy1.indersof16065*512=8225280bytesSectorsize(Iogica1.Zphysica1.):512bytes/512bytes1/0size(minimum/optima1.):512bytes/512bytesDiskidentifier:0xc3f44eb7DeviceBootStartEndB1.ocksIdSystemdevsdc1.110198I85086831.inuxDiskdevsda:53.1GB.53130297344bytes255heads,63sectors/track,6459cy1.indersUnits=cy1.indersof16065*512=8225280bytesSectorsize(Iogica1.Zphysica1.):512bytes/512bytes1/0size(minimum/optima1.):512bytes/512bytesDiskidentifier:0x000029cbDeviceBootStartEndB1.ocksIdSystemdevsda1.*126204800831.inuxPartition1doesnotendoncy1.inderboundary.devsda2266645120000821.inuxswap/So1.arisPartition2doesnotendoncy1.inderboundary.devsda366-1646046559232831.inuxroo1.6orac1.e1.OraC1.eaSm#rootOcmsnmdb1.'#sbinpartprobeASM设置:安装OraCIeaSm驱动,前面的一个,自身带有一个,共两个,如下:(rootorac1.eiorac1.eas)Irpt-qa1.greporacIeasaaorac1.eas>1.b-2.0.4-1.e16.x86-64orQc1.eo3i-3upporc-2.i.8-1.e1.6.×86-64toOteOmC1.eIorac1.easxH运行以下命令,启动ASM配置程序(以下操作root用户分别在前置机执行)etcinit.d/oracIeastnconfigureDefau1.tusertoownthedriverinterface输入gridDefau1.tgrouptoownthedriverinterface输入asmadminStartOrac1.eSM1.ibrarydriveronboot输入yFixpermissionsofOrac1.eASMdisksOnboot输入y创立ASM整盘。创立ASM磁盘使用下的命令(以下操作r<x>用户在任意一台前置机执行)0usrsbin/orac1easminitotcinit.d/orac1eastnCreatediskasm1.dovsdb1.etcinit.d/oracIeasmscandisksetcinit.d/oracIeasm1.istdisks(rootorac1.e1.OraCIeasn)etcint.d0rac1.ea3aIistdisksCRSDATAF1.ASHroot0orac1.e1.otac1.easn#安装Cvuqdisk,CVUqdiSkRPM包含在OnJCIeGridInfrastructure安装介质上的rp<n目景中(两个节点JEM).*CviwiSK-GRP-Oinsta1.1.iexportCWQD1.SK-GRP#rpm-ivhcvuqdisk-1.0.9-1.rpm如果测试安装双机互信通不过,可运行grid安装目录中的一个文件(目录为/grid/SShSetup)。在rac1.上运行(root用户).sshUserSetup.sh-userroot-hostsrac2rac1.-advanced-exverify-confirm在rac2上执行(root用户)./sshUserSetup.sh-userroot-hostsrac1.rac2-advanced-exverify-confirm在rac1.上运行(grid用户)./sshUserSetup.sh-usergrid-hostsrac2rac1.-advanced-exverify-confirm在rac2上运行(grid用户)./sshUserSetup.sh-usergrid-hostsrac1.rac2-advanced-exverify-confirm在rac1.上运行(OraC1。用户)./sshUserSetup.sh-userorac1.e-hostsrac2rac1.-advanced-exverify-confirtn在rac2上运行(OraC1。用户)./sshUserSetup.sh-userorac1.e-hostsrac1.rac2-advanced-exverify-confirm校验grid012crac1.gridS.Zrunc1.uvfy.shstage-precrsinst-norac1.e!,orac1.e2-verbose九、安装Orac1.eGridInfrastructurepridQorac1.e1.$,ZrunInsta1.IerOrc1.CCdInfraitrvctwra-S«t1»nevpCrtaInfraxtcuctumS1.pIofInHSowWtW1.”.So.*eUtMMCIfiHiiiy40Ot>uo*T06anbSftrtUgen<rthnn1.UUR*on,oEn*rupdti>Con1.IN“rcconnM4g1."8SIhe115krIyaErequrtRe*<he<*5.P*c5eUpdres«F$U5>,MMhereefmee*,o>uhesStteac*eCrfXownsQUteMjfOru1.c*u(ortcr4nta1.tfordo*11oadUse<re*i*r1.MMso11reUPaMCS5M>jftrut*S4TtTttttty!Orac1.eCcid1.ftfftKtictuco-5«tt*tUrCcidInfrMtcuctui*SteTOr13Crt4rteASMDiskCroupCDQAC1.e810InfrastructuwTTTTTWM'Z,f*,GSCCJ;",T*,t>em,、QMMTt>e,ASB1.QMkCfUf>±PSd<D»ikCroschrute4sticiSoj*ct05HWbSUPweKeckndancyAMMQCJJfw1.SiteX03OATAX那NOEqfc>c*trnt1.CggPhKMDnfcf1.Mf>tC>.>e*vErt、,/匚"ce注:上面选错了,应该选CRS.F!Oiac1.eGsd1.nfrftStcuctuieSettXZUrSIAdInfxtructuxePerformPrerequisiteChecksP10or13ORAC1.egridINrRArrviucnMieprrA1.Yincs6ResutAxupeuMr11xfrtqurt11<r*5forrjt4iwonrertw<0<1etfraftevewrntheItsuesazhfo1.<Mf>9tab1.e,andrcck1ht1.mTh,p<e*«Mis«e<or4R3n3enMberhea二eutets«(1943010«与“to1.9ftytan*mor(nondCMckFvhdonNo4*(orck?.o<cM)注:我的物理机内存大小(6G),安装OraCIe12C要求大于M内存:因为做实跄,所以没有做DNS解析,生产状态最好做DNS解析。(不影响安装,忽略了)十、检杳OG1.安装、运行状态grid$srvct1.statusnodeapps(rd3rac1.e1.bin)5.srvct1.VIPorac1.e1.-vip.hitxd.conisVIPorac1.e1.-vip.hitzd.conisVIPorac1.e2-vip.hitzd.conisVIPorac1.2-vp.hitzd.conisNotvorkisenab1.edstatusnodeappsenab1.edrunningonnode:orac1.e1.enab1.edrunningon