1/108Oracle11gR2(11.2.0.2)RACforOracleLinux5.5onVMware-serverinstall―kinghow@gmail.com这个版本比较特别,相信有人也很想试试。和以往的RAC安装有点不同,所以这里stepbystep都有截图,但是文字较少,不熟悉RAC的请仔细依图操作,见谅。(注意:这里配置只是记录了一次成功安装,如果你熟悉RAC不一定要完全按照配置操作。)安装VMware-server-2.0.2-203138序列号:免费获得使用安装的Os用户、密码登录VMserverhomepage2/1083/108TheminimumrequiredRAMis1.5GBforOracleGridInfrastructureforaCluster4/1085/1086/108选择Oraclelinux57/1088/1089/10810/108selectallocatealldiskbutton.itsveryimportanttoselectIndependentpersistentselectvirtualdevicemodescsi1selectoptimizeforperformanceocrvotingdisk在11.2已经不支持裸设备,全部放在ASM上。asm13Gasm23Gasm33Gocrvt1300Mocrvt2300Mocrvt3300Mocrvt有人用一个盘也能安装,但是有的用一个不行,ASM启动不起来。原因不明。ASM加起来5.5G11/108IfyouplantoinstallonOracleASM,thentoensurehighavailabilityofOCRorvotingdiskfilesonOracleASM,youneedtohaveatleast2GBofforOracleClusterwarefilesinthreeseparatefailuregroups,withatleastthreephysicaldisks.Eachdiskmusthaveatleast1GBofcapacitytoensurethatthereissufficientspacetocreateOracleClusterwarefiles.Ensureyouhaveatleast5.5GBofspacefortheOracleGridInfrastructureforaClusterhome(Gridhome).ThisincludesOracleClusterwareandOracleAutomaticStorageManagement(OracleASM)filesandlogfiles,andincludestheClusterHealthMonitorrepositoryForOracleClusterwareinstallations,youmustalsoaddadditionaldiskspacefortheOracleASMmetadata.Youcanusethefollowingformulatocalculatethediskspacerequirements(inMB)forOCRandvotingdiskfiles,andtheOracleASMmetadata:total=[2*ausize*disks]+[redundancy*(ausize*(nodes*(clients+1)+30)+(64*nodes)+533)]Where:–redundancy=Numberofmirrors:external=1,normal=2,high=3.–ausize=MetadataAUsizeinmegabytes.–nodes=Numberofnodesincluster.–clients-Numberofdatabaseinstancesforeachnode.–disks-Numberofdisksindiskgroup.Forexample,forafour-nodeOracleRACinstallation,usingthreedisksinanormalredundancydiskgroup,yourequireanadditionalMBofspace:[2*1*3]+[2*(1*(4*(4+1)+30)+(64*4)+533)]=1684MBToensurehighavailabilityofOracleClusterwarefilesonOracleASM,youneedtohaveatleast2GBofdiskspaceforOracleClusterwarefilesinthreeseparatefailuregroups,withatleastthreephysicaldisks.Eachdiskmusthaveatleast1GBofcapacitytoensurethatthereissufficientspacetocreateOracleClusterwarefiles.12/10813/108安装oraclelinux514/10815/10816/10817/10818/108必须Swap2G19/108#Public192.168.16.210rac1.localdomainrac1192.168.16.219rac2.localdomainrac2#Private6192.168.1.210rac1-priv.localdomainrac1-priv192.168.1.219rac2-priv.localdomainrac2-priv#Virtual192.168.16.214rac1-vip.localdomainrac1-vip192.168.16.224rac2-vip.localdomainrac2-vip需要一个DNSserver没有必须安装一个。20/10821/10822/108GNOMEDesktopEnvironmentEditorsGraphicalInternetText-basedInternetDevelopmentLibrariesDevelopmentToolsServerConfigurationToolsAdministrationToolsBaseSystemTools注意oracle和ocfs都选上XWindowSystem23/10824/10825/10826/10827/10828/10829/10830/108配置Xmanager连接:修改/usr/share/gdm/defaults.conf可写:修改配置:AllowRemoteRoot=trueEnable=trueDisplaysPerHost=10Port=177在/etc/inittab里把默认级别改为5:id:5:initdefault:再在这个文件里加一句:x:5:respawn:/usr/sbin/gdm31/108虚拟机,菜单:VM-removableDevices-CD/DVD(IDE)-connecting双击光盘进入Server菜单:OpeninTerminal安装:rpm-Uvhbinutils-2.*rpm-Uvhelfutils-libelf-0.*rpm-Uvhglibc-2.*rpm-Uvhglibc-common-2.*rpm-Uvhlibaio-0.*rpm-Uvhlibgcc-4.*rpm-Uvhlibstdc++-4.*rpm-Uvhmake-3.*rpm-Uvhcompat-libstdc++-33*rpm-Uvhelfutils-libelf-devel-*rpm-Uvhglibc-headers*rpm-Uvhglibc-devel-2.*rpm-Uvhlibgomp*rpm-Uvhgcc-4.*rpm-Uvhgcc-c++-4.*rpm-Uvhlibaio-devel-0.*rpm-Uvhlibstdc++-devel-4.*rpm-UvhunixODBC-2.*rpm-UvhunixODBC-devel-2.*rpm-Uvhsysstat-7.*编辑/etc/hosts127.0.0.1localhost.localdomainlocalhost#Public192.168.16.210rac1.localdomainrac1192.168.16.219rac2.localdomainrac2#Private6192.168.1.210rac1-priv.localdomainrac1-priv192.168.1.219rac2-priv.localdomainrac2-priv#Virtual192.168.16.214rac1-vip.localdomainrac1-vip192.168.16.224rac2-vip.localdomainrac2-vip#SCAN192.168.16.72rac-cluster-scan.localdomainrac-cluster-scan32/108Note:OraclestronglyrecommendsthatyoudonotconfigureSCANVIPaddressesinthehostsfile.UseDNSresolutionforSCANVIPs.IfyouusethehostsfiletoresolveSCANs,thenyouwillonlybeabletoresolvetooneIPaddressandyouwillhaveonlyoneSCANaddress.创建用户:groupadd-g1000oinstallgroupadd-g1031dbauseradd-u1100-goinstall-Gdbagriduseradd-u1101-goinstall-Gdbaoraclepasswdoracle提示:idoracle如果是非虚机安装,要注意记录下用户和组ID,在其它机器上创建同名组时,务必确认组ID和用户ID与此相同。创建目录以root用户身份执行以下命令:mkdir-p/u01/app/oraclemkdir-p/u01/app/gridchown-Roracle:oinstall/u01chmod-R775/u01配置Linux内核参数给出的值都为最小值,因此如果您的系统使用一个更大的值,则不要进行更改。Linux允许在系统启动并运行时修改大多数内核参数,所以无需在修改内核参数后重启系统。fs.aio-max-nr=1048576fs.file-max=6815744kernel.shmall=2097152kernel.shmmax=53687091233/108kernel.shmmni=4096kernel.sem=25032000100128net.ipv4.ip_local_port_range=102465000net.core.rmem_default=4194304net.core.rmem_max=4194304net.core.wmem_default=262144net.core.wmem_max=1048586打开/etc/sysctl.conf添加:fs.aio-max-nr=1048576fs.file-max=6815744kernel.shmmni=4096kernel.sem=25032000100128net.ipv4.ip_local_port_range=900065500net.core.rmem_default=4194304net.core.rmem_max=4194304net.core.wmem_default=262144net.core.wmem_max=1048586改变核心参数: