11gRAC安装版本:v2.0日期:2013年2月5日主要变动:1.使用NTP服务,而不是使用自带的集群时间同步。2.按照11gRAC的安装建议,建两个用户grid和oracle,分别用于安装和管理集群和数据库。3.使用三个ASM磁盘,组成OCR_VOT磁盘组,冗余为普通,确保OCR和VOTINGDISK有个镜像备份。用到的软件:操作系统:RedHatEnterpriseLinux5.7Serverx86_64oracle版本:11.2.0.1.064位及对应版本的GridInfrastructurexmanagerenterprise3用于往服务器上传软件及把服务器上的图形界面发送到本地。整个安装过程分了六个步骤:准备工作、安装GridInfrastructure、创建asm磁盘组、安装oracle软件、建库、验证。一、准备工作1.安装操作系统RedHatEnterpriseLinux5.7,略。2.配置ip和主机名ip配置如下:节点1:[root@localhost~]#ifconfig|grepBcastinetaddr:192.168.1.11Bcast:192.168.1.255Mask:255.255.255.0inetaddr:10.10.10.11Bcast:10.10.10.255Mask:255.255.255.0节点2:[root@localhost~]#ifconfig|grepBcastinetaddr:192.168.1.12Bcast:192.168.1.255Mask:255.255.255.0inetaddr:10.10.10.12Bcast:10.10.10.255Mask:255.255.255.03.配置主机名:节点1:[root@localhost~]#hostnamerac1.panda-rabbit.net[root@localhost~]#vi/etc/sysconfig/networkNETWORKING=yesHOSTNAME=rac1.panda-rabbit.netGATEWAY=192.168.1.254节点2:[root@localhost~]#hostnamerac2.panda-rabbit.net[root@localhost~]#vi/etc/sysconfig/networkNETWORKING=yesHOSTNAME=rac2.panda-rabbit.netGATEWAY=192.168.1.2544.配置两节点hosts信息:[root@localhost~]#cat/etc/hosts127.0.0.1localhostlocalhost.localdomainlocalhost4localhost4.localdomain4::1localhostlocalhost.localdomainlocalhost6localhost6.localdomain6#PublicNetwork-(eth0)192.168.1.11rac1rac1.panda-rabbit.net192.168.1.12rac2rac2.panda-rabbit.net#PublicVirtualIP(eth1)192.168.1.13rac1-viprac1-vip.panda-rabbit.net192.168.1.14rac2-viprac2-vip.panda-rabbit.net#PrivateInterconnect10.10.1.11rac1-privrac1-priv.panda-rabbit.net10.10.1.12rac2-privrac2-priv.panda-rabbit.net#scanip192.168.1.10racrac.panda-rabbit.net5.安装必要的包两节点分别执行如下三步:①配置yum[root@~]#mount/dev/dvd/root/rhel5.7mount:blockdevice/dev/hdciswrite-protected,mountingread-only或把操作系统光盘内容拷到/root/rhel5.7[root@rac1~]#cd/etc/yum.repos.d/[root@rac1~]#rm-rf*[root@~]#vi/etc/yum.repos.d/yum.repo[rhel-debuginfo]name=EnterpriseLinuxbaseurl=file:///root/rhel5.7/Server/enabled=1gpgcheck=0gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release[root@~]#yumcleanallLoadedplugins:rhnplugin,securityCleaningupEverything②检查哪些包没安装foriinbinutilscompat-gcc-34compat-libstdc++-296control-center\gccgcc-c++glibcglibc-commonglibc-devellibaiolibgccelfutils-libelf-devel\libstdc++libstdc++-devellibXpmakeopenmotif22setarch\compat-libstdc++-33libaio-develsysstatunixODBCunixODBC-develdorpm-q$i&/dev/null||F=$F$idone;echo$F;unsetF[root@~]#foriinbinutilscompat-gcc-34compat-libstdc++-296control-center\gccgcc-c++glibcglibc-commonglibc-devellibaiolibgcc\libstdc++libstdc++-devellibXpmakeopenmotif22setarch\compat-libstdc++-33libaio-develsysstatunixODBCunixODBC-develdorpm-q$i&/dev/null||F=$F$idone;echo$F;unsetFcompat-gcc-34compat-libstdc++-296libXpopenmotif22setarchcompat-libstdc++-33libaio-develunixODBCunixODBC-devel③使用yum安装这些包[root@~]#yuminstall-ycompat-gcc-34compat-libstdc++-296libXpopenmotif22setarchcompat-libstdc++-33libaio-develunixODBCunixODBC-devel6.修改内核参数分别在两节点上执行:vi/etc/sysctl.conf末尾#注释掉kernel.shmmax和kernel.shmall两行添加:kernel.shmmax=4398046511104kernel.shmall=1073741824kernel.shmmni=4096kernel.sem=25032000100128net.ipv4.ip_local_port_range=900065500net.core.rmem_default=262144net.core.rmem_max=4194304net.core.wmem_default=262144net.core.wmem_max=1048576fs.aio-max-nr=1048576fs.file-max=6815744以上参数为使用oracleyum自动配置的参数重新加载生效:[root@rac1~]#sysctl-p7.修改两节点的oracle用户限制vi/etc/security/limits.conf末尾添加:oraclesoftnofile2047oraclehardnofile65536oraclesoftnproc2047oraclehardnproc16384oraclesoftstack10240oraclehardstack32768gridsoftnofile2047gridhardnofile65536gridsoftnproc2047gridhardnproc16384gridsoftstack10240gridhardstack327688.修改两节点的/etc/pam.d/loginvi/etc/pam.d/login末尾添加:sessionrequired/lib64/security/pam_limits.so9.关闭两节点的防火墙和selinux[root@~]#serviceiptablesstopchkconfigiptablesoffsetenforce0getenforcevi/etc/selinux/config确保以下内容SELINUX=disabled[root@~]#cat/etc/selinux/config#ThisfilecontrolsthestateofSELinuxonthesystem.#SELINUX=cantakeoneofthesethreevalues:#enforcing-SELinuxsecuritypolicyisenforced.#permissive-SELinuxprintswarningsinsteadofenforcing.#disabled-SELinuxisfullydisabled.SELINUX=disabled#SELINUXTYPE=typeofpolicyinuse.Possiblevaluesare:#targeted-Onlytargetednetworkdaemonsareprotected.#strict-FullSELinuxprotection.SELINUXTYPE=targeted10.两节点配置ntp服务[root@~]#yuminstallntp[root@~]#vi/etc/ntp.conf添加一行server21.12.145.44[root@~]#vi/etc/sysconfig/ntpdOPTIONS=-x-untp:ntp-p/var/run/ntpd.pid[root@~]#servicentpdrestart[root@~]#chkconfigntpdon11.更改安装所有者的ulimit设置两节点都要执行:vi/etc/profile末尾添加:if[/$USER=oracle]||[$USER=grid];thenif[/$SHELL=/bin/ksh];thenulimit-p16384ulimit-n65536elseulimit-u16384-n65536fiumask022fi12.两节点建立必要的组和用户[root@~]#groupadd-g501oinstallgroupadd-g502dbagroupadd-g503opergroupadd-g504asmadmingroupadd-g505asmdbagroupadd-g506asmoperuseradd-u501-goinstall-Gdba,oper,asmdbaoracleuseradd-u502-goinstall-Gasmadmin,asmoper,asmdbagridpasswdoraclepasswdgrid用户和组的说明:13.两节点建立安装目录[root@~]#mkdir/u01/oracle/db-pcd/u01/mkdirgridcd/u01/gridmkdirbasecrschown-Roracle:oinstall/u01chown-Rgrid:oinstall/u01/gridchmod775/u01-R14.两节点设置oracle和grid用