oracle 11g grid安装指南

软件环境

l        操作系统:Redhat linux 6.2

l        数据库和集群件版本:ORACLE 11204

l        用户组和文件系统配置

用户组和文件系统配置

 

 

 

 

 

软件组件

用户

主组

辅助组

主目录

软件目录

Grid Infra

grid

oinstall

dba

/oracle/grid

/oracle/grid

检查必要的软件包

binutils-2.20.51.0.2-5.11.el6 (x86_64)

compat-libstdc++-33-3.2.3-69.el6 (x86_64)

glibc-2.12-1.7.el6 (x86_64)

ksh-*.el6 (x86_64)    <== any version of ksh is acceptable

libaio-0.3.107-10.el6 (x86_64)

libgcc-4.4.4-13.el6 (x86_64)

libstdc++-4.4.4-13.el6 (x86_64)

make-3.81-19.el6 (x86_64)

compat-libcap1-1.10-1 (x86_64)

gcc-4.4.4-13.el6 (x86_64)

gcc-c++-4.4.4-13.el6 (x86_64)

glibc-devel-2.12-1.7.el6 (x86_64)

libaio-devel-0.3.107-10.el6 (x86_64)

libstdc++-devel-4.4.4-13.el6 (x86_64)

sysstat-9.0.4-11.el6 (x86_64)

compat-libstdc++-33-3.2.3-69.el6 (i686)

glibc-2.12-1.7.el6 (i686)

glibc-devel-2.12-1.7.el6 (i686)

libaio-0.3.107-10.el6 (i686)

libaio-devel-0.3.107-10.el6 (i686)

libgcc-4.4.4-13.el6 (i686)

libstdc++-4.4.4-13.el6 (i686)

libstdc++-devel-4.4.4-13.el6 (i686)

elfutils-libelf-devel-0.97

 

网络需求(两节点均要执行)

l        每个节点一个public IP

l        每个节点一个public VIP

l        每个节点一个private IP

l        一个用于集群的SCAN名称和一个和public IP同网段的IP

public IP,VIPprivate IP,scan vip写入/etc/hosts文件

192.168.56.101       node1

192.168.56.103       node1-vip

10.10.10.17       node1-priv

           

192.168.56.105       node-scan

           

192.168.56.102      node2

192.168.56.104       node2-vip

10.10.10.18       node2-priv

 

基本参数设置(两节点均要执行)

编辑/etc/sysctl.conf 添加如下内容:

 vi /etc/sysctl.conf

kernel.shmall = 8388608

kernel.shmmax = 17179869184

kernel.shmmni = 4096

kernel.sem = 250 32000 100 128

fs.file-max = 6553600

fs.aio-max-nr = 1048576

net.ipv4.ip_local_port_range = 9000 65500

net.core.rmem_default = 262144

net.core.rmem_max = 4194304

net.core.wmem_default = 262144

net.core.wmem_max = 1048576

/sbin/sysctl –p

编辑/etc/pam.d/login 添加如下内容:

vi /etc/pam.d/login

session    required     pam_limits.so

 

编辑vi /etc/profile添加如下内容:

if [ /$USER = "oracle" ] || [ /$USER = "grid" ]; then

    if [ /$SHELL = "/bin/ksh" ]; then

        ulimit -p 16384

        ulimit -n 65536

    else

        ulimit -u 16384 -n 65536

    fi

    umask 022

fi

创建用户,组(两节点均要执行)

要求

        创建GRID用户

        创建oinstallDBA

 

  创建命令

        groupadd -g 501 oinstall

        groupadd -g 502 dba

       useradd -u 501 -g oinstall -G dba grid

        passwd grid

       

用户shell限制(两节点均要执行)

编辑/etc/security/limits.conf 添加如下内容:

 vi /etc/security/limits.conf

grid soft nproc 2047

grid hard nproc 16384

grid soft nofile 1024

grid hard nofile 65536

grid ssh信任关系设置

设置前先修改ssh配置文件参数:

grid用户:

node1:

[grid @ node1~]$ ssh-keygen -t rsa        //一路回车

[grid @ node1~]$ ssh-keygen -t dsa

[grid @ node1~]$ cd .ssh

[grid @ node1.ssh]$ cat *.pub > authorized_keys   

node2:

[grid @ node2~]$ ssh-keygen -t rsa        //一路回车

[grid @ node2~]$ ssh-keygen -t dsa

node1:

[grid@node1 .ssh]$ scp authorized_keys node2:/home/grid/.ssh/       

//yes  输入busrac2 grid用户密码

node2:

[grid @ node2~]$ cd .ssh

[grid@node2 .ssh]$ cat *.pub >> authorized_keys

[grid@node2 .ssh]$ scp authorized_keys node1:/home/grid/.ssh/  

验证ssh用户等效性

node1:

第一次选择yes

[grid @ node1 ~]$ ssh node1 date

[grid @ node1 ~]$ ssh node2 date

[grid @ node1 ~]$ ssh node1-priv date

[grid @ node1 ~]$ ssh node2-priv date

切换至node 2 执行  

[grid @ node2 ~]$ ssh node1 date

[grid @ node2 ~]$ ssh node2 date

[grid @ node2 ~]$ ssh node1-priv date

[grid @ node2 ~]$ ssh node2-priv date

//如果不需要输入密码,则配置成功

环境变量设置

node1  grid用户:

export ORACLE_BASE=/oracle/base

export ORACLE_HOME=/oracle/grid

export ORACLE_SID=+ASM1

export PATH=$ORACLE_HOME/bin:$ORACLE_HOME/OPatch:$PATH

 

node2  grid用户:

export ORACLE_BASE=/oracle/base

export ORACLE_HOME=/oracle/grid

export ORACLE_SID=+ASM2

export PATH=$ORACLE_HOME/bin:$ORACLE_HOME/OPatch:$PATH

 

创建软件安装目录

# mkdir -p /oracle

# chown -R oracle:oinstall /oracle

# chmod -R 775 /oracle

 

 

 

 

安装Grid Infrastructure

p13390677_112040_Linux-x86-64_3of7.zip

unzip p13390677_112040_Linux-x86-64_3of7.zip

su grid

  设置DISPLAY环境变量

$ export LANG=en_US

$ ./runInstaller

 

安装截图

 

出来下面安装界面,选择最下面的Skip software updates,然后选next

oracle <wbr>11g <wbr>grid安装指南

选择第一个安装和配置集群环境,next

oracle <wbr>11g <wbr>grid安装指南

选择第二个高级安装,next

oracle <wbr>11g <wbr>grid安装指南

选上添加简体中文,nextoracle <wbr>11g <wbr>grid安装指南

此处集群名自己取,SCAN名需要和/etc/hosts中的scan ip别名一致,端口默认,不选GNSnext

oracle <wbr>11g <wbr>grid安装指南

添加busrac2节点,并进行ssh测试,next

oracle <wbr>11g <wbr>grid安装指南

oracle <wbr>11g <wbr>grid安装指南
配置网络接口:选对网卡类型,next
oracle <wbr>11g <wbr>grid安装指南

oracle <wbr>11g <wbr>grid安装指南

oracle <wbr>11g <wbr>grid安装指南

存储选择:选择ASMnext

oracle <wbr>11g <wbr>grid安装指南
建立OCRVOTE盘,选择32G的盘 next
oracle <wbr>11g <wbr>grid安装指南

设置密码:next

oracle <wbr>11g <wbr>grid安装指南

oracle <wbr>11g <wbr>grid安装指南

oracle <wbr>11g <wbr>grid安装指南

安装路径指定:选择ORACLE_BASEORACLE_HOME,根据自己设置来,建议ORACLE_BASE不和RDBMS软件ORACLE_BASE不是同一个,方便管理

oracle <wbr>11g <wbr>grid安装指南

oracle <wbr>11g <wbr>grid安装指南

 

检测结果:

  • 查看检测结果,如果fixableyes则可以通过按fix&check again,执行脚本来修复(不保证一定可以修复),如果不能,则只能手工修复,经检查,可以忽略,选择ignore all继续安装
oracle <wbr>11g <wbr>grid安装指南

oracle <wbr>11g <wbr>grid安装指南

oracle <wbr>11g <wbr>grid安装指南
root身份执行脚本:root用户执行两个脚本,一个节点执行完后再执行第二个节点
oracle <wbr>11g <wbr>grid安装指南

执行脚本。

注意:

l        root脚本在所有节点一定要成功完成

l        如果root.sh执行失败

Ø        切换到root,在失败的节点执行"$GRID_HOME/crs/install/rootcrs.pl -verbose -deconfig -force".注意不能是最后一个节点

Ø        如果是deconfig整个集群,那么在执行完第一步后,在最后一个节点运行"$GRID_HOME/crs/install/rootcrs.pl -verbose -deconfig -force -lastnode".这个命令会清空OCR VOTE

安装完成:

 

[root@node1 etc]# /oracle/oraInventory/orainstRoot.sh

Changing permissions of /oracle/oraInventory.

Adding read,write permissions for group.

Removing read,write,execute permissions for world.

 

Changing groupname of /oracle/oraInventory to oinstall.

The execution of the script is complete.

[root@node1 etc]# /oracle/grid/root.sh

Performing root user operation for Oracle 11g

 

The following environment variables are set as:

    ORACLE_OWNER= grid

    ORACLE_HOME=  /oracle/grid

 

Enter the full pathname of the local bin directory: [/usr/local/bin]:

   Copying dbhome to /usr/local/bin ...

   Copying oraenv to /usr/local/bin ...

   Copying coraenv to /usr/local/bin ...

 

 

Creating /etc/oratab file...

Entries will be added to the /etc/oratab file as needed by

Database Configuration Assistant when a database is created

Finished running generic part of root script.

Now product-specific root actions will be performed.

Using configuration parameter file: /oracle/grid/crs/install/crsconfig_params

Creating trace directory

User ignored Prerequisites during installation

Installing Trace File Analyzer

OLR initialization - successful

  root wallet

  root wallet cert

  root cert export

  peer wallet

  profile reader wallet

  pa wallet

  peer wallet keys

  pa wallet keys

  peer cert request

  pa cert request

  peer cert

  pa cert

  peer root cert TP

  profile reader root cert TP

  pa root cert TP

  peer pa cert TP

  pa peer cert TP

  profile reader pa cert TP

  profile reader peer cert TP

  peer user cert

  pa user cert

Adding Clusterware entries to upstart

CRS-2672: Attempting to start 'ora.mdnsd' on 'node1'

CRS-2676: Start of 'ora.mdnsd' on 'node1' succeeded

CRS-2672: Attempting to start 'ora.gpnpd' on 'node1'

CRS-2676: Start of 'ora.gpnpd' on 'node1' succeeded

CRS-2672: Attempting to start 'ora.cssdmonitor' on 'node1'

CRS-2672: Attempting to start 'ora.gipcd' on 'node1'

CRS-2676: Start of 'ora.gipcd' on 'node1' succeeded

CRS-2676: Start of 'ora.cssdmonitor' on 'node1' succeeded

CRS-2672: Attempting to start 'ora.cssd' on 'node1'

CRS-2672: Attempting to start 'ora.diskmon' on 'node1'

CRS-2676: Start of 'ora.diskmon' on 'node1' succeeded

CRS-2676: Start of 'ora.cssd' on 'node1' succeeded

 

ASM created and started successfully.

 

Disk Group OCRVOTE created successfully.

 

clscfg: -install mode specified

Successfully accumulated necessary OCR keys.

Creating OCR keys for user 'root', privgrp 'root'..

Operation successful.

CRS-4256: Updating the profile

Successful addition of voting disk 540fb05eb3844feabfe3959578c282f1.

Successful addition of voting disk 5608478ff1cd4f1cbf70f9d01ea120a2.

Successful addition of voting disk 108c03b12f8f4f43bf047c41c61e360c.

Successfully replaced voting disk group with +OCRVOTE.

CRS-4256: Updating the profile

CRS-4266: Voting file(s) successfully replaced

##  STATE    File Universal Id                File Name Disk group

--  -----    -----------------                --------- ---------

 1. ONLINE   540fb05eb3844feabfe3959578c282f1 (/dev/asm-diskb) [OCRVOTE]

 2. ONLINE   5608478ff1cd4f1cbf70f9d01ea120a2 (/dev/asm-diskc) [OCRVOTE]

 3. ONLINE   108c03b12f8f4f43bf047c41c61e360c (/dev/asm-diskd) [OCRVOTE]

Located 3 voting disk(s).

CRS-2672: Attempting to start 'ora.asm' on 'node1'

CRS-2676: Start of 'ora.asm' on 'node1' succeeded

CRS-2672: Attempting to start 'ora.OCRVOTE.dg' on 'node1'

CRS-2676: Start of 'ora.OCRVOTE.dg' on 'node1' succeeded

Configure Oracle Grid Infrastructure for a Cluster ... succeeded

 

 

 

[root@node2 etc]# /oracle/oraInventory/orainstRoot.sh

Changing permissions of /oracle/oraInventory.

Adding read,write permissions for group.

Removing read,write,execute permissions for world.

 

Changing groupname of /oracle/oraInventory to oinstall.

The execution of the script is complete.

[root@node2 etc]# /oracle/grid/root.sh

Performing root user operation for Oracle 11g

 

The following environment variables are set as:

    ORACLE_OWNER= grid

    ORACLE_HOME=  /oracle/grid

 

Enter the full pathname of the local bin directory: [/usr/local/bin]:

   Copying dbhome to /usr/local/bin ...

   Copying oraenv to /usr/local/bin ...

   Copying coraenv to /usr/local/bin ...

 

 

Creating /etc/oratab file...

Entries will be added to the /etc/oratab file as needed by

Database Configuration Assistant when a database is created

Finished running generic part of root script.

Now product-specific root actions will be performed.

Using configuration parameter file: /oracle/grid/crs/install/crsconfig_params

Creating trace directory

User ignored Prerequisites during installation

Installing Trace File Analyzer

OLR initialization - successful

Adding Clusterware entries to upstart

CRS-4402: The CSS daemon was started in exclusive mode but found an active CSS daemon on node node1, number 1, and is terminating

An active cluster was found during exclusive startup, restarting to join the cluster

Configure Oracle Grid Infrastructure for a Cluster ... succeeded


oracle <wbr>11g <wbr>grid安装指南

oracle <wbr>11g <wbr>grid安装指南

oracle <wbr>11g <wbr>grid安装指南

oracle <wbr>11g <wbr>grid安装指南


请使用浏览器的分享功能分享到微信等