您好,欢迎访问三七文档
1配置linux环境编辑/etc/hosts文件[root@node1]#vi/etc/hosts#Donotremovethefollowingline,orvariousprograms#thatrequirenetworkfunctionalitywillfail.#127.0.0.1node1localhost.localdomainlocalhost127.0.0.1localhost10.21.1.101rac110.21.1.102rac210.21.1.111rac1-vip10.21.1.112rac2-vip10.10.10.1rac1-priv10.10.10.2rac2-priv配置内核参数vi/etc/sysctl.confkernel.shmall=2097152kernel.shmmax=536870912kernel.shmmni=4096kernel.sem=25032000100128fs.file-max=65536net.ipv4.ip_local_port_range=102465000net.core.rmem_default=1048576net.core.rmem_max=1048576net.core.wmem_default=262144net.core.wmem_max=262144重启生效/sbin/sysctl–p提高Oracle用户的shell限制设置oracle使用的文件数权限vi/etc/security/limits.conf增加下列内容oraclesoftnproc2047oraclehardnproc16384oraclesoftnofile1024oraclehardnofile65536修改安全限制[root@node1~]#vi/etc/pam.d/login增加:sessionrequired/lib/security/pam_limits.sovi/etc/rc.localmodprobehangcheck-timerhangcheck-tick=30hangcheck_margin=180在root用户下创建oralce用户和设置:groupaddoinstallgroupadddbauseradd-goinstall-Gdbaoraclepasswdoraclemkdir-p/u01/app/oracle/product/10.2.0/crsmkdir-p/u01/app/oracle/product/10.2.0/db_1mkdir-p/u01/oradatachown-Roracle.oinstall/u01touch/etc/hosts.equivchmod600/etc/hosts.equivchownroot:root/etc/hosts.equivvi/etc/hosts.equiv+rac1oracle+rac2oracle+rac1-privoracle+rac2-privoracle设置环境变量vi/home/oracle/.bash_profile添加以下内容exportTMP=/tmpexportTMPDIR=$TMPexportORACLE_BASE=/u01/app/oracleexportORACLE_SID=rac1exportORACLE_HOME=$ORACLE_BASE/product/10.2.0/db_1exportORA_CRS_HOME=$ORACLE_BASE/product/10.2.0/crs_1exportLD_LIBRARY_PATH=$ORACLE_HOME/libexportPATH=$ORACLE_HOME/bin:$ORA_CRS_HOME/bin:/bin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/X11R6/binulimit-u16384-n65536umask022~2,安装oracleasm支持包驱动下载地址:,首先需要ASMLib驱动程序包,可以从相关的网站下载到和操作系统对应的rpm文件,分别为oracleasm-support-2.0.3-1、oracleasm-2.6.18-8.el5-2.0.4-1.el5、oracleasmlib-2.0.3-1.el5。#rpm-Uvhoracleasm*.rpm#rpm-qa|greporacleasmoracleasm-support-2.0.3-1oracleasm-2.6.18-8.el5-2.0.4-1.el5oracleasmlib-2.0.3-1.el5[root@RHEL5Desktop]#rpm-ivhoracleasmlib-2.0.4-1.el5.i386.rpmerror:Faileddependencies:oracleasm=1.0.4isneededbyoracleasmlib-2.0.4-1.el5.i386[root@RHEL5Desktop]#Mykernelversionis:[root@RHEL5Desktop]#uname-rnRHEL5.32.6.18-164.el5oracleasm-support-2.0.3-1、oracleasm-2.6.18-8.el5-2.0.4-1.el5、oracleasmlib-2.0.3-1.el5。3创建共享磁盘手动创建G:\RAC\shared点addHardware路径是[rac]rac/shared/racshare_1.vmdk5块硬盘添加成功G:\node1\node1.vmx,打开.vmx文件,添加下列内容:disk.locking=falsediskLib.dataCacheMaxSize=0diskLib.dataCacheMaxReadAheadSize=0diskLib.DataCacheMinReadAheadSize=0diskLib.dataCachePageSize=4096diskLib.maxUnsyncedWrites=0scsi1.sharedBus=VIRTUALscsi1:1.deviceType=diskscsi1:2.deviceType=diskscsi1:3.deviceType=diskscsi1:4.deviceType=diskscsi1:5.deviceType=disk提示:如果你创建有磁盘有多个,注意要按照你的实际情况修改。创建OracleASM创建磁盘分区Cd/devLssd*root@node1dev]#lssd*sdasda1sda2sdbsdcsddsdesdffdisk/dev/sdb需要你输入的依次是n/p/1/回车/回车/w。DevicecontainsneitheravalidDOSpartitiontable,norSun,SGIorOSFdisklabelBuildinganewDOSdisklabel.Changeswillremaininmemoryonly,untilyoudecidetowritethem.Afterthat,ofcourse,thepreviouscontentwon'tberecoverable.Thenumberofcylindersforthisdiskissetto1044.Thereisnothingwrongwiththat,butthisislargerthan1024,andcouldincertainsetupscauseproblemswith:1)softwarethatrunsatboottime(e.g.,oldversionsofLILO)2)bootingandpartitioningsoftwarefromotherOSs(e.g.,DOSFDISK,OS/2FDISK)Warning:invalidflag0x0000ofpartitiontable4willbecorrectedbyw(rite)Command(mforhelp):nCommandactioneextendedpprimarypartition(1-4)pPartitionnumber(1-4):1Firstcylinder(1-1044,default1):Usingdefaultvalue1Lastcylinderor+sizeor+sizeMor+sizeK(1-1044,default1044):Usingdefaultvalue1044Command(mforhelp):wThepartitiontablehasbeenaltered!Callingioctl()tore-readpartitiontable.Syncingdisks.[root@node1dev]#lssd*sdasda1sda2sdbsdb1sdcsddsdesdf把所有的sdc,sdd,sde,sdf设置完成![root@node1dev]#lssd*sdasda1sda2sdbsdb1sdcsdc1sddsdd1sdesde1sdfsdf1安装asm所需要的支持包安装oracleasmlib程序包。从OTN下载ASM库,并以root用户身份安装ASMRPM:node1dev]#uname-aLinuxnode12.6.18-8.el5xen#1SMPFriJan2614:42:21EST2007i686i686i386GNU/LinuxLibraryandToolsoracleasm-support-2.1.3-1.el5.i386.rpmoracleasmlib-2.0.4-1.el5.i386.rpmDriversforkernel2.6.18-8.el5oracleasm-2.6.18-8.el5xen-2.0.4-1.el5.i686.rpmoracleasm-2.6.18-8.el5PAE-2.0.4-1.el5.i686.rpmoracleasm-2.6.18-8.el5-2.0.4-1.el5.i686.rpm提示,如果在安装过程中提示你缺少其它包,你可以先到操作系统安装光盘中寻找并安装所需系统包,然后再来安装下载到的包。[root@node1oracleasm]#rpm-ivh*[root@node1oracleasm]#rpm-ivhoracleasm-2.6.18-8.el5PAE-2.0.4-1.el5.i686.rpmerror:Faileddependencies:kernel-PAE=2.6.18-8.el5isneededbyoracleasm-2.6.18-8.el5PAE-2.0.4-1.el5.i686本人在安装过程中缺少kernel-PAE-2.6.18-8.el5.i686.rpm在第一张盘中找到,装上即可。配置裸设备由于RHEL5中取消了rawdevices,如果不想将映射命令放到rc.local中的话,我们就需要将其配置到/etc/udev/rules.d/文件夹中修改文件/etc/udev/rules.d/60-raw.rulesvi/etc/udev/rules.d/60-raw.rules添加以下内容ACTION==add,KERNEL==/dev/sdb1,RUN+=/bin/raw/dev/raw/raw1%NACTION==add,ENV{MAJOR}==8,ENV{MINOR}==17,RUN+=/bin/raw/dev/raw/raw1%M%mACTION==add,KERNEL==/dev/sdc1,RUN+=/bin/raw/dev/raw/raw2
本文标题:虚拟机安装rac
链接地址:https://www.777doc.com/doc-30818 .html