《Server在Oracle Enterprise Linux上安装Oracle RAC 10g.docx》由会员分享,可在线阅读,更多相关《Server在Oracle Enterprise Linux上安装Oracle RAC 10g.docx(85页珍藏版)》请在课桌文档上搜索。
1、使用VMwareServer在Orac1.eEnterprise1.inux上安装Orac1.eRACIog1硬件配置主机操作系统环境主机名操作系统处理器内磁盘网卡testWindows2003SP2(32位)2颗Inte1.Xeon(TM)3GHz4GBIBMSCSIBroadcomNetXtremeGigabitEthernet客户操作系统环境主机名操作系统处理器内存rac1.Orac1.eEnterprise1.inux4(32位)1800MBrac2Orac1.eEnterprise1.inux4(32位)1800MB虚拟磁盘布局主机操作系统上的虚拟磁盘客户操作系统上的虚拟磁盘虚拟设备
2、节点大小(GB)描述g:vmracIMoca1.disk.vmdkdevsda1.devsda2devsda3SCSI0:020ur挂载点交换空间g:XvnVsharedstorageocfs2disk.v11mkdirvmrac1G:mkdirvmrac2G:mkdirVmXsharedstorage按CTR1.-N创立一个新的虚拟机。1 .新建虚拟机向导:单击Next2 .选择适当的配置:a.虚拟机配置:选择CUSta!3 .选择客户操作系统:a.客户操作系统:选择1.inuxb.版本:选择RedHatEnterprise1.inux44 .令名虚拟机:a.虚拟机名称:输入“rac1.”。
3、b.位置:输入“g:vmracrac1.。5 .设置访问权限:a.访问权限:选择Makethisvirtua1.nachineprivate6 .启动/关闭选项:a.虚拟机帐户:选择USerthatpowersonthevirtua1.nachine7 .处理器配置:a.处理器:选择1.个处理器。8 .虚拟机内存:a.内存:选择800MB9 .网络类型:a.网络连接:选择Usebridgednetworking.10 .选择I/O适配器类型:a.1/0适配器类型:选择1.S1.1.ogic.11 .选择球盘:a.磁盘:选择Createanewvirtua1.disk.12 .选择微盘类型:H.
4、虚拟磁盘类型:选择SCS1.(Recowended)13 .指定磁盘容量:a.磁盘容量:输入“20GB”b.取消选择A1.1.ocatea1.1.diskspacenow,为了节省空间,现在不必分配所有度盘空间。14 .指定磁盘文件:a.磁盘文件:输入“1.oCaIdiSk.vmdk”b.单击Finish重复步腺16-24以创立四个虚拟SCSI硬盘一OCfS2disk.vmdk(512MB)、asmdisk1.vmdk(3GB)、HSmdiSk2.vm31 .虚拟机设置:单击OKI*,ratryCommand*SUrttfF3MtW4641*vtuaiMdvwMttrosTaxecenowfo
5、rttttHwcr*Ve:h7MtdOffUmMU:RdMetKsrpmaIrUXCEgatSK:G1.wiVecHRedHjtErteHeiru4.mraDitk48CSXIt)5u4Didc5CXSXI3)duateI6)hU11kNhU0tt(jFr*r0!t47r4rtttt*aIbdr444Kct-R1.y,z1.rSrvrIO3/修改虚拟机配支文件.还需要设置其他参数以启用两个虚拟RAC节点之间的磁盘共享。翻开配置文件g:vmrac1.RedHatEnterprise1.inux4.vmx,并添加下面列出的粗体叁数.config,version=8,virtua1.HW.versi
6、on=4scsi.present=TRUEscsi.virta1.Dev三1.si1.ogicmemsize=800scsi0:0.present=TRUE,scsi0:O.=1.oca1.disk,v111.kide1.:O.present=TRUEide1.:O.=autodetectide1.:0.deviceType=*cdrom-rawfIoppyO.present=FA1.SE”EthernetO.present=TRUEdiSp1.ayName=RAC1,guestOS=rhe14priority,grabbed=norma1.”priority,ungrabbed=norma1
7、.disk,1.ocking=FA1.SEdisk1.ib.dataCacheMaxSize=0,scsi1.SharedBus=virtua1.,scsi1.present=TRUEscsi1:0.present=TRUE,scsi1.:0.=*G:XvnXsharedstorageocfs2disk.vmdkscsi1:0.mode=independent-persistent”scsi1.:0.devicType=diskscsi1.:1.present=TRUEscsi1.:1.=*G:vmsharedstorageas111.isk1.vmdkscsi1.:1.mode=indepe
8、ndent-persistent”scsi1.:1.dviceType三diskscsi1:2.present=TRUE,scsi1:2.=*G:XvnXsharedstorageXasmdisk2.vmdkscsi1:2.mode=independent-persistent”scsi1.:2.deviceType=diskscsi1:3.present=TRUE,scsi1:3.=G:vmsharedstorageasmdisk3.vmdk”scsi1:3.mode=independent-persistent”scsi1.:3.deviceType=diskscsi1.Virtua1.D
9、ev=Isi1.ogic*ide1.:0.autodetect=wTRUEnEthernet1.present=TRUEEthernet1.ConnectionType=*hoston1.yrscsi0:0.redo=*scsi1:0.redo=scsi1.:I.redo=*scsi1:2.redo=*,scsi1:3.redo=ide1.:0.StartConnected=TRUEethernet.addressType=generated”ethernet1.a6 .翻开一个终端并执行vmaeconfig-t1.s.p1.0输入所需的显示大小。同步客户OS与主机OS的时间。在安装Orac1
10、.e集群件和Orac1.e数据库软件时,OraCIe安装程序将首先在本地节点上安装软件,然后再将软件远程贪制到远程节点。如果两个RAC节点的日期和时间未同步,您可能会收到类似于以下内容的错误。rbintar:.inventoryComponents21orac1.e.ordim.server/10.2.0.1.0:timestamp2006-11-0406:24:04is25sinthefuture,要确保成功安装OraC1.eRAC.虚拟机上的时间必须与主机上的时间同步。执行下面的步骤,以root用户身份同步时间。1 .执行YmwareTooIbox”以显示VMuareToo1.sPrope
11、rties窗口。在Options选项卡下.选择Timesynchronizationbetweenthevirtua1.nachineandthehostoperatingsyte.发现ioIsSyncThnQ=TRuEiI参数已经追加到虚拟机配置文件g:vmracrac1.RedHatEnterprise1.inux4.vmx中。2 .编辑bootgrbgrb.conf.并将选项c1.ock二Pitnosmpnoapicno1.apic添加到读取内核/boot/的那一行。您已经将选项添加到两个内核,现在只需对特定内核进行更改。boot=devsdadefau1.t=。timeout=5sp1
12、.ashiBage=(hd.O)bootgrubsp1.ash,x三.gzhiddcnnenutit1.eEnteprise(2.6.9-42.O.O.O.1.E1.smp)root(hdO.O)kerne1.bootv111.inuz-2.6.9-42.O.O.O.1.E1.SaProroot=1.ABE1.=/rhbquietc1.ock=itnosmpnoapicno1.apicinitrd/Iwot/initrd-2.6.9-42.O.O.O.I.E1.sitp.igtit1.eEnterPriSe-UP(2.6.912.O.O.O.1.E1.)root(hdO.O)kerne1.b(
13、Ktv1.inuz-2.6.942.O.O.O,1,E1.,oroot=1.ABE1.=/rhbquietc1.o,k=pitnosmpnoapicno1.apicinitrdbtinitrd-2.6.9-42.O.O.O.1.E1.img3 .更新引导rac1.o#reboot2.2.2配置2.2.2.1 创立OraC1.e用户(root)# groupaddoinsta1.1# groupadddba# mkdir-pu1./orac1.eocfs# usoradd-du1./orac1.e-goinsta1.1-Gdba-sbinkshorac1.e# chownorac1.e:dbau
14、1./orac1.eu()1.口PaSSWdorac1.eNewPassword:Re-enternewPassword:passwd:passwordsuccessfu1.1.ychangedfororac1.e2.2.2.2 创立orac1.e用户环境文件(rt)# s-orac1.e# vi.pfofi1.eexportPS1.=binhstna三c-S-texportEDITOR=ViexportORAC1.ESIfr=devdhIexportORAC1.EB.SEuOI/orac1.eexportORAC1.EHOME=SORACIESEproduct10.2.0/db.1.expo
15、rtORAyRSIOME=$0RAC1.E_BASE/DrOdUC1./1。,2.0crs.export1.D1.IBRARYPATH$0RAc1.EHOME/1.ibexportPATtt=$ORAC1.E_HOME/bin:WRACRSJwME/bin:JPATHUmaSk0222.2.2.3 创立文件系统目录结构(OraCIe)su-orac1.erac1.-mkdir-p$ORAC1.E_BASE/adminrac1.-mkdir-p$0RAC1.EjOMErac1.-mkdir-p$0RkCR5IOMErad-mkdir-pu1/orac1e/oradatadevdb2.2.2.4
16、提高Orac1.e用户的she1.1.限制(root)将下面列出的行添加到etcsecurity1.imits.conf,etcpam.d/1.ogin和etcprofiIeetcsecurity1.i三its.confOrdC1.Osoft11proc2047orac1ehardnproc16384orac1.esoftnoorac1.ehardnoetcpa1.d/1.oginsessionrequired/1ib/securitypinIiaits.soetcprofi1.eifSCSER=worac1.e*;thenifSSIIE1.1.=*7binksh;thenU1.iait-P1
17、6394u1.iait-n65536e1.seu1.iMit-u16384-n65536fifi2.2.2.5 安装Enterprise1.inux软件程序包(rt)安装Orac1.e软件需要以下附加程序包。如果是64位版本的Enterprise1.inux,则已安装了这些程序包。1ibaio0.3.105-2.i386.rpmOpenmo1.if21-2.1.30-11.RHE1.4.6.i386.rpm从ISOCD第三张光盘解压缩这些程序包.上传到/root下,并以root用户费份执行下面的命令。#rpn-ivhIibaio-O.3.105-2.i386.rpm#rpn-ivhopenmo
18、tif21-2.1.30-11.RHE1.4.6.i386.rpn2.2.2.6配置内核参数(root)将下面列出的行添加到e1.csysct1.conf要使更改立即生效,请执行sbinsysct1.-p4Vietcsysct1.confkerne1.,sha1.1=2097152kerne1.,sh三nax=2147483648kerne1.ShBmni=4096kerne1.,se三=2503200010012865536net.ipv4.ip1.oca1.portrange102165000net.core.11hdetau1.t=1048576net.core.rinem_max=10
19、48576net.core,w11*mdefau1.t=262144net.core.wmem_max=2621449sbinsysct1.-p2.2.2.7 修改etchosts文件(root)*vietchosts127.0.0.11.oca1.host10.100.235.33rac1.10.100.235.34rac1.-vip10.100.10.31rac1.-priv10.J00.235.40rac210.t00.235.35rac2-vip10,100.10.32rac2-riv2.2.2.8 配置hangchecktimer内核模块(root)hangchecktimer内核模
20、块可监控系统的运行情况,并重新启动出现故障的RAC节点。它使用两个参数,即hangchecktick(定义系统检查率)和hangcheckInargin(定义在重置RAC节点前的最大挂起延时)来确定节点是否出现故障。在etcmodprobe.conf中添加以下行,以没置hangcheck内核模块参数。etcmodprobe.conf#Vietc11dprobe-vhangcheck-timer=modprobe-vhangcheck-timer2.2.2.9 为0CFS2和Orac1.eASM创立磁叁分区(root)UfdiskdevsdbXfdiskdevsdcSfdiskdevsddfdi
21、skdevsde每个磁盘:划一个分区,输入n-pT-w2.2.2.10 安装orac1.easm1.ib程序包(root)T我包OraCIeaSm1.ib-2.O.2-1.i386.rpm,上传到/rootT#rp-ivhorac1.easm1.ib_2.0.2-1.i386.rnPreparing.Ha三C55583C113三tiP5三113U0M805SC115三C55583SI100%IIiorac1.easm1.ibnt*rHt*rttrtnrntr*rfHntt*t*H*t*rtt1.IUUbJ检查已安装的ASM程序包。一安爰系统时选择安装一安装系统时选择安装一已经手动安装#rjn-
22、qa.grepOraC1.eaSmOraC1.eaSm-SUPPOrt-2.0.3-2orac1.easm-2.6.9-42.0.0.0.1.E1.smp-2.0.3-2orac1.easm1.ib-2.0.2-12.2.2.11为ASM磁盘映射原始设备执行以下任务,将原始设备映射到先前创立的共享分区。每次引导集群节点时.原始设备梆必须与块设备绑定。将以下行添加到etcsysconfig/rawdevices中。*vietcsysconfigrawdevicesdevrawraw1.devsdc1.devrawraw2devsdd1.devraw/raw3/加v/sde1.要使映射立即生效,以
23、root用户身份执行以下令令:PsbinservicerawdevicesrestartAssigningdevices:devrawraw1.-devsdc1major8,minor33devsdd1.major8,minor49devsde1.devrawraw1.:boundtodevrawraw2/devraw/raw2:boundtodevrawraw3devrawraw3:boundtomajor8,minor65doneSchownorac1.eidbadevrawraw*#chmo(i660devrawraw*#Is-Iatdevrawraw*CrW-FW1orac1.edba
24、162,工Nov407:01devrawraw3crw-ru,1orac1.edba162,2Nov407:04devrawraw2CrW-FW)orac1.edba162.1Nov407:04devrauraw1.以OraC1.e用户身份执行#SU-orac1.erac1c1.n-sfdevrawraw1.Zasmdisk1.rac1.-1.n-sfdevrawraw2.asmdisk2rac1.-1.n-sfdevrawraw3.asmdisk32.2.2.12修改/etc/udev/permissions.d50-udev.permissions原始设备在引导时会重新映射。默认情况下,在
25、引导时原始设备的拥有者将更改为root用户。如果拥有者不是orac1.e用户,则ASM在访问共享分区时会出现问题。在etcudevpermissions.d50-udev.permissions中为原始行raw/*:root:disk:0660”添加注#,然后添加一个新行raw*:orac1.e:dba:0660*#1.awdevicesram*:root:disk:0660raw*:root:iisk:0660raw/*:orac1.e:dba:06603创立并配置第二个虚拟机要创立第二个虚拟机,只需关闭第一个虚拟机,将g:vmrac1.中的所有文件复制到g:vmrac2,然后更改几个配置即
26、可。3.1 修改网络配置1 .在rac1.上,以root用户身份执行#shutdown-hnow2 .在主机系统上,将rac1.文件夹中的所有文件复制到rac23 .在VMwareServer控制台上,按CTR1.T)翻开第二个虚拟机4 .VMwareServer控制台:O将虚拟机名称从rac1.重令名为rac20右键单击您刚刚描开的新rac1.选项卡,然后选择Settings选择Options选项卡。1.虚拟机名称:输入“rac2”。Virtua1.IaekineSttiBomcS即ngsSrrr&DGenefaiRAC2Power&Sndp女切8PefaNiom叵StatShdo*MnPo
27、wei或举由三JAdvarcedVertbn:IReCUWaking。IeCtoySuspend1.ietandmatboUMIbertoedhe在rac1.上执行Jtsu-orac1.erac1.-nkdir.sshrac1.-chmod700/.sshrac1.-ssh-keygen-trsarac1.-ssh-keygen-tdsa在rac2上执行#SU-orac1.erac2-mkdirV.sshrac2-chmod700.sshrac2-ssh-keygen-trsarac2-ssh-keygen-tdsa在rac1.上执行rac1.-cat.ssh/id_rsa.pubV.ssh/authorized_keysrac1.-ca1.ssh/id_dsa.pub.ssh/au1.horized_keysrac1.-sshrac2cat.ssh/id_rsa.pubV.ssh/authorized_keysrac1.-sshrac2cat.ssh/id_dsa.pub/.ssh/authorized_keysrac1.-scp.sshathorizedkeysrac2:.ssh/auIhorizedkeys在每个节点上测