手把手一起安装RAC

参考视频:

  • [bbk5218] 第1集 - Oracle 11gR2 RAC Installation - 01
  • [bbk5211] 第2集 - Oracle 11gR2 RAC Installation - 02
  • [bbk5218] 第3集 - Oracle 11gR2 RAC Installation - 03
  • [bbk5226] 第4集 - Oracle 11gR2 RAC Installation - 04
  • [bbk5231] 第5集 - Oracle 11gR2 RAC Installation - 05
  • [bbk5239] 第6集 - Oracle 11gR2 RAC Installation - 06

3、Create User Accounts

  • grid用户的环境变量配置
ORACLE_BASE=/u01/gridbase
ORACLE_HOME=/u01/grid

PATH=$ORACLE_HOME/bin:$PATH
LD_LIBRARY_PATH=$ORACLE_HOME/lib:$LD_LIBRARY_PATH

DISPLAY=192.168.1.168:0.0

export ORACLE_BASE ORACLE_HOME PATH LD_LIBRARY_PATH DISPLAY
View Code
  • oracle用户的环境变量配置
ORACLE_BASE=/u01/oracle
ORACLE_HOME=/u01/oracle/db
ORACLE_SID=racdb1

PATH=$ORACLE_HOME/bin:$PATH
LD_LIBRARY_PATH=$ORACLE_HOME/lib:$LD_LIBRARY_PATH

DISPLAY=192.168.1.168:0.0

export ORACLE_BASE ORACLE_HOME ORACLE_SID PATH LD_LIBRARY_PATH DISPLAY
View Code

4、Configure Kernel Parameters

  • 将selinux设置为disabled状态
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
#       enforcing - SELinux security policy is enforced.
#       permissive - SELinux prints warnings instead of enforcing.
#       disabled - SELinux is fully disabled.
SELINUX=disabled
# SELINUXTYPE= type of policy in use. Possible values are:
#       targeted - Only targeted network daemons are protected.
#       strict - Full SELinux protection.
SELINUXTYPE=targeted
View Code 
  •  将iptables、iptables6、sendmail关掉
  • 配置/etc/sysctl.conf文件,在文件末尾添加如下参数
kernel.shmmax = 68719476736
kernel.shmall = 4294967296
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
fs.file-max = 6815744
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=1048586
fs.aio-max-nr = 1048576
View Code 
  • 使/etc/sysctl.conf文件中的参数设置生效
[root@RAC1 ~]# sysctl -p
net.ipv4.ip_forward = 0
net.ipv4.conf.default.rp_filter = 2
net.ipv4.conf.default.accept_source_route = 0
kernel.sysrq = 0
kernel.core_uses_pid = 1
net.ipv4.tcp_syncookies = 1
kernel.msgmnb = 65536
kernel.msgmax = 65536
kernel.shmmax = 4294967295
kernel.shmall = 268435456
kernel.shmmax = 68719476736
kernel.shmall = 4294967296
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
fs.file-max = 6815744
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 = 1048586
fs.aio-max-nr = 1048576
View Code 
  • 在/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
View Code
  •  在/etc/security/limits.conf文件末尾添加参数
grid soft nproc 2047
grid hard nproc 16384
grid soft nofile 1024
grid hard nofile 65536
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
View Code 
  • 在/etc/pam.d/login文件中添加如下参数
ession     required     pam_limits.so
View Code 
  •  设置共享内存尺寸
[root@RAC1 ~]# umount tmpfs 
[root@RAC1 ~]# mount -t tmpfs shmfs -o size=3000m /dev/shm
[root@RAC1 ~]# 
View Code 
  • 修改/etc/fstab参数数据
LABEL=/                 /                       ext3    defaults        1 1
tmpfs                   /dev/shm                tmpfs   defaults        0 0
devpts                  /dev/pts                devpts  gid=5,mode=620  0 0
sysfs                   /sys                    sysfs   defaults        0 0
proc                    /proc                   proc    defaults        0 0
LABEL=SWAP-sda2         swap                    swap    defaults        0 0
~
修改前 
LABEL=/                 /                       ext3    defaults        1 1
tmpfs                   /dev/shm                tmpfs   size=3000m      0 0
devpts                  /dev/pts                devpts  gid=5,mode=620  0 0
sysfs                   /sys                    sysfs   defaults        0 0
proc                    /proc                   proc    defaults        0 0
LABEL=SWAP-sda2         swap                    swap    defaults        0 0
修改后 
  • Disable External NTP Services

停止使用NTPD服务,事情oracle提供的时间同步服务(Oracle Cluster Time Synchronization Service.)

[root@RAC1 ~]# service ntpd stop
Shutting down ntpd: [FAILED]
[root@RAC1 ~]# service ntpd start
Starting ntpd: [  OK  ]
[root@RAC1 ~]# service ntpd stop 
Shutting down ntpd: [  OK  ]
[root@RAC1 ~]# chkconfig ntpd off
[root@RAC1 ~]# cd /etc/
[root@RAC1 etc]# ls ntp*
ntp.conf

ntp:
keys  ntpservers  step-tickers
[root@RAC1 etc]# mv ntp.conf ntp.conf.20130616
[root@RAC1 etc]# 
[root@RAC1 etc]# cd /var/
[root@RAC1 var]# cd run/
--假如存在ntpd对应的*.pid进程信息文件,删除即可
[root@RAC1 run]# ls -l *.pid
-rw-r--r-- 1 root  root   5 Jun 16 13:19 atd.pid
-rw-r--r-- 1 root  root   5 Jun 16 13:15 auditd.pid
-rw-r--r-- 1 root  root   5 Jun 16 13:15 brcm_iscsiuio.pid
-rw-r--r-- 1 root  root   5 Jun 16 13:19 crond.pid
-rw-r--r-- 1 root  root   5 Jun 16 13:16 cupsd.pid
-rw-r--r-- 1 root  root   5 Jun 16 13:19 gpm.pid
-rw-r--r-- 1 root  root   5 Jun 16 13:15 haldaemon.pid
-rw-r--r-- 1 root  root   5 Jun 16 13:16 hpiod.pid
-rw-r--r-- 1 root  root   5 Jun 16 13:16 hpssd.pid
-rw------- 1 root  root   5 Jun 16 13:15 iscsid.pid
-rw------- 1 root  root   5 Jun 16 13:15 klogd.pid
-rw-r--r-- 1 root  root   5 Jun 16 13:15 messagebus.pid
-rw-r--r-- 1 root  root   4 Jun 16 13:19 modclusterd.pid
-rw------- 1 root  root   4 Jun 16 13:19 oddjobd.pid
-rw-r--r-- 1 root  root   4 Jun 16 13:15 pcscd.pid
-rw-r--r-- 1 root  root   4 Jun 16 13:19 ricci.pid
-rw-r--r-- 1 root  root   5 Jun 16 13:15 rpc.statd.pid
-rw------- 1 root  smmsp 33 Jun 16 13:18 sendmail.pid
-rw-r--r-- 1 smmsp smmsp 49 Jun 16 13:19 sm-client.pid
-rw-r--r-- 1 root  root   5 Jun 16 13:16 sshd.pid
-rw------- 1 root  root   5 Jun 16 13:15 syslogd.pid
lrwxrwxrwx 1 root  root  34 Jun 16 13:19 tog-pegasus.pid -> /var/run/tog-pegasus/cimserver.pid
-rw-r--r-- 1 root  root   6 Jun 16 13:19 xfs.pid
-rw-r--r-- 1 root  root   5 Jun 16 13:16 xinetd.pid
View Code 

5、Create Shared Disks

安装时,遇到错误解决方法:

在进行cvu进行安装rac检测时,如遇到错误
Result: PRVF-4007 : User equivalence check failed for user "grid"

解决方案:
这一块要对双节点全执行一遍,对自己也还要执行

$ssh rac1 date 
$ssh rac1-priv date 
$ssh rac2 date 
$ssh rac2-priv date
Result: PRVF-4007 : User equivalence check failed for user "grid" 

crs安装前验证脚本

./runcluvfy.sh stage -pre crsinst -n rac1,rac2 -fixup -verbose
View Code

假如执行此验证,出现如下错误

Checking user equivalence...

Check: User equivalence for user "grid"
  Node Name                             Comment                 
  ------------------------------------  ------------------------
  rac2                                  passed                  
  rac1                                  failed                  
Result: PRVF-4007 : User equivalence check failed for user "grid"

WARNING: 
User equivalence is not set for nodes:
        rac1
Verification will proceed with nodes:
        rac2
View Code

 解决办法:

这一块要对双节点全执行一遍,对自己也还要执行
注意:在grid和在oracle用户下,均要执行;否则后面会出错.(前提是你使用grid和oracle用户来安装)
$ssh rac1 date $ssh rac1
-privdate $ssh rac2 date $ssh rac2-privdate
[grid@rac1 g]$ ./runcluvfy.sh stage -pre crsinst -n rac1,rac2 -fixup -verbose

Performing pre-checks for cluster services setup 

Checking node reachability...

Check: Node reachability from node "rac1"
  Destination Node                      Reachable?              
  ------------------------------------  ------------------------
  rac2                                  yes                     
  rac1                                  yes                     
Result: Node reachability check passed from node "rac1"


Checking user equivalence...

Check: User equivalence for user "grid"
  Node Name                             Comment                 
  ------------------------------------  ------------------------
  rac2                                  passed                  
  rac1                                  passed                  
Result: User equivalence check passed for user "grid"

Checking node connectivity...

Checking hosts config file...
  Node Name     Status                    Comment                 
  ------------  ------------------------  ------------------------
  rac2          passed                                            
  rac1          passed                                            

Verification of the hosts config file successful


Interface information for node "rac2"
 Name   IP Address      Subnet          Gateway         Def. Gateway    HW Address        MTU   
 ------ --------------- --------------- --------------- --------------- ----------------- ------
 eth0   192.168.1.204   192.168.1.0     0.0.0.0         192.168.1.1     00:0C:29:BD:21:E1 1500  
 eth1   192.168.137.204 192.168.137.0   0.0.0.0         192.168.1.1     00:0C:29:BD:21:EB 1500  


Interface information for node "rac1"
 Name   IP Address      Subnet          Gateway         Def. Gateway    HW Address        MTU   
 ------ --------------- --------------- --------------- --------------- ----------------- ------
 eth0   192.168.1.203   192.168.1.0     0.0.0.0         192.168.1.1     00:0C:29:C7:42:47 1500  
 eth1   192.168.137.203 192.168.137.0   0.0.0.0         192.168.1.1     00:0C:29:C7:42:51 1500  


Check: Node connectivity of subnet "192.168.1.0"
  Source                          Destination                     Connected?      
  ------------------------------  ------------------------------  ----------------
  rac2:eth0                       rac1:eth0                       yes             
Result: Node connectivity passed for subnet "192.168.1.0" with node(s) rac2,rac1


Check: TCP connectivity of subnet "192.168.1.0"
  Source                          Destination                     Connected?      
  ------------------------------  ------------------------------  ----------------
  rac1:192.168.1.203              rac2:192.168.1.204              passed          
Result: TCP connectivity check passed for subnet "192.168.1.0"


Check: Node connectivity of subnet "192.168.137.0"
  Source                          Destination                     Connected?      
  ------------------------------  ------------------------------  ----------------
  rac2:eth1                       rac1:eth1                       yes             
Result: Node connectivity passed for subnet "192.168.137.0" with node(s) rac2,rac1


Check: TCP connectivity of subnet "192.168.137.0"
  Source                          Destination                     Connected?      
  ------------------------------  ------------------------------  ----------------
  rac1:192.168.137.203            rac2:192.168.137.204            passed          
Result: TCP connectivity check passed for subnet "192.168.137.0"


Interfaces found on subnet "192.168.1.0" that are likely candidates for VIP are:
rac2 eth0:192.168.1.204
rac1 eth0:192.168.1.203

Interfaces found on subnet "192.168.137.0" that are likely candidates for a private interconnect are:
rac2 eth1:192.168.137.204
rac1 eth1:192.168.137.203

Result: Node connectivity check passed


Check: Total memory 
  Node Name     Available                 Required                  Comment   
  ------------  ------------------------  ------------------------  ----------
  rac2          2.47GB (2595216.0KB)      1.5GB (1572864.0KB)       passed    
  rac1          2.47GB (2595216.0KB)      1.5GB (1572864.0KB)       passed    
Result: Total memory check passed

Check: Available memory 
  Node Name     Available                 Required                  Comment   
  ------------  ------------------------  ------------------------  ----------
  rac2          2.39GB (2510660.0KB)      50MB (51200.0KB)          passed    
  rac1          2.33GB (2443388.0KB)      50MB (51200.0KB)          passed    
Result: Available memory check passed

Check: Swap space 
  Node Name     Available                 Required                  Comment   
  ------------  ------------------------  ------------------------  ----------
  rac2          5GB (5245212.0KB)         2.47GB (2595216.0KB)      passed    
  rac1          5GB (5245212.0KB)         2.47GB (2595216.0KB)      passed    
Result: Swap space check passed

Check: Free disk space for "rac2:/tmp" 
  Path              Node Name     Mount point   Available     Required      Comment     
  ----------------  ------------  ------------  ------------  ------------  ------------
  /tmp              rac2          /             19.64GB       1GB           passed      
Result: Free disk space check passed for "rac2:/tmp"

Check: Free disk space for "rac1:/tmp" 
  Path              Node Name     Mount point   Available     Required      Comment     
  ----------------  ------------  ------------  ------------  ------------  ------------
  /tmp              rac1          /             15.39GB       1GB           passed      
Result: Free disk space check passed for "rac1:/tmp"

Check: User existence for "grid" 
  Node Name     Status                    Comment                 
  ------------  ------------------------  ------------------------
  rac2          exists                    passed                  
  rac1          exists                    passed                  
Result: User existence check passed for "grid"

Check: Group existence for "oinstall" 
  Node Name     Status                    Comment                 
  ------------  ------------------------  ------------------------
  rac2          exists                    passed                  
  rac1          exists                    passed                  
Result: Group existence check passed for "oinstall"

Check: Group existence for "dba" 
  Node Name     Status                    Comment                 
  ------------  ------------------------  ------------------------
  rac2          exists                    passed                  
  rac1          exists                    passed                  
Result: Group existence check passed for "dba"

Check: Membership of user "grid" in group "oinstall" [as Primary]
  Node Name         User Exists   Group Exists  User in Group  Primary       Comment     
  ----------------  ------------  ------------  ------------  ------------  ------------
  rac2              yes           yes           yes           yes           passed      
  rac1              yes           yes           yes           yes           passed      
Result: Membership check for user "grid" in group "oinstall" [as Primary] passed

Check: Membership of user "grid" in group "dba" 
  Node Name         User Exists   Group Exists  User in Group  Comment         
  ----------------  ------------  ------------  ------------  ----------------
  rac2              yes           yes           yes           passed          
  rac1              yes           yes           yes           passed          
Result: Membership check for user "grid" in group "dba" passed

Check: Run level 
  Node Name     run level                 Required                  Comment   
  ------------  ------------------------  ------------------------  ----------
  rac2          3                         3,5                       passed    
  rac1          3                         3,5                       passed    
Result: Run level check passed

Check: Hard limits for "maximum open file descriptors" 
  Node Name         Type          Available     Required      Comment         
  ----------------  ------------  ------------  ------------  ----------------
  rac2              hard          65536         65536         passed          
  rac1              hard          65536         65536         passed          
Result: Hard limits check passed for "maximum open file descriptors"

Check: Soft limits for "maximum open file descriptors" 
  Node Name         Type          Available     Required      Comment         
  ----------------  ------------  ------------  ------------  ----------------
  rac2              soft          1024          1024          passed          
  rac1              soft          1024          1024          passed          
Result: Soft limits check passed for "maximum open file descriptors"

Check: Hard limits for "maximum user processes" 
  Node Name         Type          Available     Required      Comment         
  ----------------  ------------  ------------  ------------  ----------------
  rac2              hard          16384         16384         passed          
  rac1              hard          16384         16384         passed          
Result: Hard limits check passed for "maximum user processes"

Check: Soft limits for "maximum user processes" 
  Node Name         Type          Available     Required      Comment         
  ----------------  ------------  ------------  ------------  ----------------
  rac2              soft          2047          2047          passed          
  rac1              soft          2047          2047          passed          
Result: Soft limits check passed for "maximum user processes"

Check: System architecture 
  Node Name     Available                 Required                  Comment   
  ------------  ------------------------  ------------------------  ----------
  rac2          i686                      x86                       passed    
  rac1          i686                      x86                       passed    
Result: System architecture check passed

Check: Kernel version 
  Node Name     Available                 Required                  Comment   
  ------------  ------------------------  ------------------------  ----------
  rac2          2.6.18-238.el5            2.6.18                    passed    
  rac1          2.6.18-238.el5            2.6.18                    passed    
Result: Kernel version check passed

Check: Kernel parameter for "semmsl" 
  Node Name     Configured                Required                  Comment   
  ------------  ------------------------  ------------------------  ----------
  rac2          250                       250                       passed    
  rac1          250                       250                       passed    
Result: Kernel parameter check passed for "semmsl"

Check: Kernel parameter for "semmns" 
  Node Name     Configured                Required                  Comment   
  ------------  ------------------------  ------------------------  ----------
  rac2          32000                     32000                     passed    
  rac1          32000                     32000                     passed    
Result: Kernel parameter check passed for "semmns"

Check: Kernel parameter for "semopm" 
  Node Name     Configured                Required                  Comment   
  ------------  ------------------------  ------------------------  ----------
  rac2          100                       100                       passed    
  rac1          100                       100                       passed    
Result: Kernel parameter check passed for "semopm"

Check: Kernel parameter for "semmni" 
  Node Name     Configured                Required                  Comment   
  ------------  ------------------------  ------------------------  ----------
  rac2          128                       128                       passed    
  rac1          128                       128                       passed    
Result: Kernel parameter check passed for "semmni"

Check: Kernel parameter for "shmmax" 
  Node Name     Configured                Required                  Comment   
  ------------  ------------------------  ------------------------  ----------
  rac2          4294967295                536870912                 passed    
  rac1          4294967295                536870912                 passed    
Result: Kernel parameter check passed for "shmmax"

Check: Kernel parameter for "shmmni" 
  Node Name     Configured                Required                  Comment   
  ------------  ------------------------  ------------------------  ----------
  rac2          4096                      4096                      passed    
  rac1          4096                      4096                      passed    
Result: Kernel parameter check passed for "shmmni"

Check: Kernel parameter for "shmall" 
  Node Name     Configured                Required                  Comment   
  ------------  ------------------------  ------------------------  ----------
  rac2          268435456                 2097152                   passed    
  rac1          268435456                 2097152                   passed    
Result: Kernel parameter check passed for "shmall"

Check: Kernel parameter for "file-max" 
  Node Name     Configured                Required                  Comment   
  ------------  ------------------------  ------------------------  ----------
  rac2          6815744                   6815744                   passed    
  rac1          6815744                   6815744                   passed    
Result: Kernel parameter check passed for "file-max"

Check: Kernel parameter for "ip_local_port_range" 
  Node Name     Configured                Required                  Comment   
  ------------  ------------------------  ------------------------  ----------
  rac2          between 9000 & 65500      between 9000 & 65500      passed    
  rac1          between 9000 & 65500      between 9000 & 65500      passed    
Result: Kernel parameter check passed for "ip_local_port_range"

Check: Kernel parameter for "rmem_default" 
  Node Name     Configured                Required                  Comment   
  ------------  ------------------------  ------------------------  ----------
  rac2          262144                    262144                    passed    
  rac1          262144                    262144                    passed    
Result: Kernel parameter check passed for "rmem_default"

Check: Kernel parameter for "rmem_max" 
  Node Name     Configured                Required                  Comment   
  ------------  ------------------------  ------------------------  ----------
  rac2          4194304                   4194304                   passed    
  rac1          4194304                   4194304                   passed    
Result: Kernel parameter check passed for "rmem_max"

Check: Kernel parameter for "wmem_default" 
  Node Name     Configured                Required                  Comment   
  ------------  ------------------------  ------------------------  ----------
  rac2          262144                    262144                    passed    
  rac1          262144                    262144                    passed    
Result: Kernel parameter check passed for "wmem_default"

Check: Kernel parameter for "wmem_max" 
  Node Name     Configured                Required                  Comment   
  ------------  ------------------------  ------------------------  ----------
  rac2          1048586                   1048576                   passed    
  rac1          1048586                   1048576                   passed    
Result: Kernel parameter check passed for "wmem_max"

Check: Kernel parameter for "aio-max-nr" 
  Node Name     Configured                Required                  Comment   
  ------------  ------------------------  ------------------------  ----------
  rac2          1048576                   1048576                   passed    
  rac1          1048576                   1048576                   passed    
Result: Kernel parameter check passed for "aio-max-nr"

Check: Package existence for "make-3.81" 
  Node Name     Available                 Required                  Comment   
  ------------  ------------------------  ------------------------  ----------
  rac2          make-3.81-3.el5           make-3.81                 passed    
  rac1          make-3.81-3.el5           make-3.81                 passed    
Result: Package existence check passed for "make-3.81"

Check: Package existence for "binutils-2.17.50.0.6" 
  Node Name     Available                 Required                  Comment   
  ------------  ------------------------  ------------------------  ----------
  rac2          binutils-2.17.50.0.6-14.el5  binutils-2.17.50.0.6      passed    
  rac1          binutils-2.17.50.0.6-14.el5  binutils-2.17.50.0.6      passed    
Result: Package existence check passed for "binutils-2.17.50.0.6"

Check: Package existence for "gcc-4.1.2" 
  Node Name     Available                 Required                  Comment   
  ------------  ------------------------  ------------------------  ----------
  rac2          gcc-4.1.2-50.el5          gcc-4.1.2                 passed    
  rac1          gcc-4.1.2-50.el5          gcc-4.1.2                 passed    
Result: Package existence check passed for "gcc-4.1.2"

Check: Package existence for "gcc-c++-4.1.2" 
  Node Name     Available                 Required                  Comment   
  ------------  ------------------------  ------------------------  ----------
  rac2          gcc-c++-4.1.2-50.el5      gcc-c++-4.1.2             passed    
  rac1          gcc-c++-4.1.2-50.el5      gcc-c++-4.1.2             passed    
Result: Package existence check passed for "gcc-c++-4.1.2"

Check: Package existence for "libgomp-4.1.2" 
  Node Name     Available                 Required                  Comment   
  ------------  ------------------------  ------------------------  ----------
  rac2          libgomp-4.4.4-13.el5      libgomp-4.1.2             passed    
  rac1          libgomp-4.4.4-13.el5      libgomp-4.1.2             passed    
Result: Package existence check passed for "libgomp-4.1.2"

Check: Package existence for "libaio-0.3.106" 
  Node Name     Available                 Required                  Comment   
  ------------  ------------------------  ------------------------  ----------
  rac2          libaio-0.3.106-5          libaio-0.3.106            passed    
  rac1          libaio-0.3.106-5          libaio-0.3.106            passed    
Result: Package existence check passed for "libaio-0.3.106"

Check: Package existence for "glibc-2.5-24" 
  Node Name     Available                 Required                  Comment   
  ------------  ------------------------  ------------------------  ----------
  rac2          glibc-2.5-58              glibc-2.5-24              passed    
  rac1          glibc-2.5-58              glibc-2.5-24              passed    
Result: Package existence check passed for "glibc-2.5-24"

Check: Package existence for "compat-libstdc++-33-3.2.3" 
  Node Name     Available                 Required                  Comment   
  ------------  ------------------------  ------------------------  ----------
  rac2          compat-libstdc++-33-3.2.3-61  compat-libstdc++-33-3.2.3  passed    
  rac1          compat-libstdc++-33-3.2.3-61  compat-libstdc++-33-3.2.3  passed    
Result: Package existence check passed for "compat-libstdc++-33-3.2.3"

Check: Package existence for "elfutils-libelf-0.125" 
  Node Name     Available                 Required                  Comment   
  ------------  ------------------------  ------------------------  ----------
  rac2          elfutils-libelf-0.137-3.el5  elfutils-libelf-0.125     passed    
  rac1          elfutils-libelf-0.137-3.el5  elfutils-libelf-0.125     passed    
Result: Package existence check passed for "elfutils-libelf-0.125"

Check: Package existence for "elfutils-libelf-devel-0.125" 
  Node Name     Available                 Required                  Comment   
  ------------  ------------------------  ------------------------  ----------
  rac2          elfutils-libelf-devel-0.137-3.el5  elfutils-libelf-devel-0.125  passed    
  rac1          elfutils-libelf-devel-0.137-3.el5  elfutils-libelf-devel-0.125  passed    
Result: Package existence check passed for "elfutils-libelf-devel-0.125"

Check: Package existence for "glibc-common-2.5" 
  Node Name     Available                 Required                  Comment   
  ------------  ------------------------  ------------------------  ----------
  rac2          glibc-common-2.5-58       glibc-common-2.5          passed    
  rac1          glibc-common-2.5-58       glibc-common-2.5          passed    
Result: Package existence check passed for "glibc-common-2.5"

Check: Package existence for "glibc-devel-2.5" 
  Node Name     Available                 Required                  Comment   
  ------------  ------------------------  ------------------------  ----------
  rac2          glibc-devel-2.5-58        glibc-devel-2.5           passed    
  rac1          glibc-devel-2.5-58        glibc-devel-2.5           passed    
Result: Package existence check passed for "glibc-devel-2.5"

Check: Package existence for "glibc-headers-2.5" 
  Node Name     Available                 Required                  Comment   
  ------------  ------------------------  ------------------------  ----------
  rac2          glibc-headers-2.5-58      glibc-headers-2.5         passed    
  rac1          glibc-headers-2.5-58      glibc-headers-2.5         passed    
Result: Package existence check passed for "glibc-headers-2.5"

Check: Package existence for "libaio-devel-0.3.106" 
  Node Name     Available                 Required                  Comment   
  ------------  ------------------------  ------------------------  ----------
  rac2          libaio-devel-0.3.106-5    libaio-devel-0.3.106      passed    
  rac1          libaio-devel-0.3.106-5    libaio-devel-0.3.106      passed    
Result: Package existence check passed for "libaio-devel-0.3.106"

Check: Package existence for "libgcc-4.1.2" 
  Node Name     Available                 Required                  Comment   
  ------------  ------------------------  ------------------------  ----------
  rac2          libgcc-4.1.2-50.el5       libgcc-4.1.2              passed    
  rac1          libgcc-4.1.2-50.el5       libgcc-4.1.2              passed    
Result: Package existence check passed for "libgcc-4.1.2"

Check: Package existence for "libstdc++-4.1.2" 
  Node Name     Available                 Required                  Comment   
  ------------  ------------------------  ------------------------  ----------
  rac2          libstdc++-4.1.2-50.el5    libstdc++-4.1.2           passed    
  rac1          libstdc++-4.1.2-50.el5    libstdc++-4.1.2           passed    
Result: Package existence check passed for "libstdc++-4.1.2"

Check: Package existence for "libstdc++-devel-4.1.2" 
  Node Name     Available                 Required                  Comment   
  ------------  ------------------------  ------------------------  ----------
  rac2          libstdc++-devel-4.1.2-50.el5  libstdc++-devel-4.1.2     passed    
  rac1          libstdc++-devel-4.1.2-50.el5  libstdc++-devel-4.1.2     passed    
Result: Package existence check passed for "libstdc++-devel-4.1.2"

Check: Package existence for "sysstat-7.0.2" 
  Node Name     Available                 Required                  Comment   
  ------------  ------------------------  ------------------------  ----------
  rac2          sysstat-7.0.2-3.el5_5.1   sysstat-7.0.2             passed    
  rac1          sysstat-7.0.2-3.el5_5.1   sysstat-7.0.2             passed    
Result: Package existence check passed for "sysstat-7.0.2"

Check: Package existence for "unixODBC-2.2.11" 
  Node Name     Available                 Required                  Comment   
  ------------  ------------------------  ------------------------  ----------
  rac2          unixODBC-2.2.11-7.1       unixODBC-2.2.11           passed    
  rac1          unixODBC-2.2.11-7.1       unixODBC-2.2.11           passed    
Result: Package existence check passed for "unixODBC-2.2.11"

Check: Package existence for "unixODBC-devel-2.2.11" 
  Node Name     Available                 Required                  Comment   
  ------------  ------------------------  ------------------------  ----------
  rac2          unixODBC-devel-2.2.11-7.1  unixODBC-devel-2.2.11     passed    
  rac1          unixODBC-devel-2.2.11-7.1  unixODBC-devel-2.2.11     passed    
Result: Package existence check passed for "unixODBC-devel-2.2.11"

Check: Package existence for "ksh-20060214" 
  Node Name     Available                 Required                  Comment   
  ------------  ------------------------  ------------------------  ----------
  rac2          ksh-20100202-1.el5_5.1    ksh-20060214              passed    
  rac1          ksh-20100202-1.el5_5.1    ksh-20060214              passed    
Result: Package existence check passed for "ksh-20060214"

Checking for multiple users with UID value 0
Result: Check for multiple users with UID value 0 passed 

Check: Current group ID 
Result: Current group ID check passed
Checking Core file name pattern consistency...
Core file name pattern consistency check passed.

Checking to make sure user "grid" is not in "root" group
  Node Name     Status                    Comment                 
  ------------  ------------------------  ------------------------
  rac2          does not exist            passed                  
  rac1          does not exist            passed                  
Result: User "grid" is not part of "root" group. Check passed

Check default user file creation mask
  Node Name     Available                 Required                  Comment   
  ------------  ------------------------  ------------------------  ----------
  rac2          0022                      0022                      passed    
  rac1          0022                      0022                      passed    
Result: Default user file creation mask check passed

Starting Clock synchronization checks using Network Time Protocol(NTP)...

NTP Configuration file check started...
Network Time Protocol(NTP) configuration file not found on any of the nodes. Oracle Cluster Time Synchronization Service(CTSS) can be used instead of NTP for time synchronization on the cluster nodes

Result: Clock synchronization check using Network Time Protocol(NTP) passed


Pre-check for cluster services setup was successful. 
完美的CVU执行结果

Simple RAC Administration

  • start & stop clusterware
#/u01/grid/bin/crsctl start cluster -all

#/u01/grid/bin/crsctl stop cluster -all
View Code 
  • start & stop database instances 
$ srvctl start database -d racdb

$ srvctl stop database -d racdb
View Code

查看磁盘组使用情况

SQL> select name,state,total_mb,free_mb from v$asm_diskgroup;

NAME                           STATE         TOTAL_MB    FREE_MB
------------------------------ ----------- ---------- ----------
DATA                           CONNECTED        40945      37338
View Code

关闭RAC环境顺序

1、oracle用户

$ srvctl stop database -d racdb 
View Code

 2、root用户

#/u01/grid/bin/crsctl stop cluster -all
View Code

启动RAC环境

1、root用户

#/u01/grid/bin/crsctl start cluster -all
View Code

2、oracle用户

$ srvctl start database -d racdb 
View Code

查看集群软件的状态 

[grid@rac1 ~]$ crs_stat -t
Name           Type           Target    State     Host        
------------------------------------------------------------
ora.DATA.dg    ora....up.type ONLINE    ONLINE    rac1        
ora....ER.lsnr ora....er.type ONLINE    ONLINE    rac1        
ora....N1.lsnr ora....er.type ONLINE    ONLINE    rac1        
ora.asm        ora.asm.type   ONLINE    ONLINE    rac1        
ora.eons       ora.eons.type  ONLINE    ONLINE    rac1        
ora.gsd        ora.gsd.type   OFFLINE   OFFLINE               
ora....network ora....rk.type ONLINE    ONLINE    rac1        
ora.oc4j       ora.oc4j.type  OFFLINE   OFFLINE               
ora.ons        ora.ons.type   ONLINE    ONLINE    rac1        
ora....SM1.asm application    ONLINE    ONLINE    rac1        
ora....C1.lsnr application    ONLINE    ONLINE    rac1        
ora.rac1.gsd   application    OFFLINE   OFFLINE               
ora.rac1.ons   application    ONLINE    ONLINE    rac1        
ora.rac1.vip   ora....t1.type ONLINE    ONLINE    rac1        
ora....SM2.asm application    ONLINE    ONLINE    rac2        
ora....C2.lsnr application    ONLINE    ONLINE    rac2        
ora.rac2.gsd   application    OFFLINE   OFFLINE               
ora.rac2.ons   application    ONLINE    ONLINE    rac2        
ora.rac2.vip   ora....t1.type ONLINE    ONLINE    rac2        
ora.racdb.db   ora....se.type ONLINE    ONLINE    rac1        
ora.scan1.vip  ora....ip.type ONLINE    ONLINE    rac1 
View Code 

Summary

In this lesson,you should have learned how to:

  • Learn the detailed process to setup Oracle 11gR2 RAC.
  • Learn how to startup and shutdown RAC.
  • Learn the basic administration method about RAC. 

 

 

 

 

posted @ 2013-06-16 15:05  ArcerZhang  阅读(1235)  评论(0编辑  收藏  举报