在宿主机(IP:192.168.247.1)上启动Xmanager Passive。然后在虚拟机上设置DISPLAY环境变量。
[grid@rac1 ~]$ export DISPLAY=192.168.247.1:0.0
[grid@rac1 ~]$ cd grid/
[grid@rac1 grid]$ ./runInstaller
忽略更新。
选择安装集群。
选择高级安装。
修改SCAN Name。
点击Add,增加节点。
配置SSH等价。
自动获取到前面配置的网络。
选择ASM。
选择磁盘发现路径,创建一个磁盘组,此处只能创建一个。
设置密码。
选择管理组。
指定安装路径。
指定软件仓库目录。
先决条件检查后,列出检查失败项,点击Fix&Check Again进行修复和再次检查。
生成修复脚本。
运行脚本进行修复。
[root@rac1 ~]# /tmp/CVU_11.2.0.4.0_grid/runfixup.sh
Response file being used is :/tmp/CVU_11.2.0.4.0_grid/fixup.response
Enable file being used is :/tmp/CVU_11.2.0.4.0_grid/fixup.enable
Log file location: /tmp/CVU_11.2.0.4.0_grid/orarun.log
Setting Kernel Parameters...
The value for shmmni in response file is not greater than value of shmmni for current session. Hence not changing it.
The value for semmsl in response file is not greater than value of semmsl for current session. Hence not changing it.
The value for semmns in response file is not greater than value of semmns for current session. Hence not changing it.
The value for semmni in response file is not greater than value of semmni for current session. Hence not changing it.
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.wmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_max = 1048576
fs.aio-max-nr = 1048576
uid=1100(grid) gid=6000(oinstall) groups=6000(oinstall),5000(asmadmin),5001(asmdba),5002(asmoper)
[root@rac2 ~]# /tmp/CVU_11.2.0.4.0_grid/runfixup.sh
Response file being used is :/tmp/CVU_11.2.0.4.0_grid/fixup.response
Enable file being used is :/tmp/CVU_11.2.0.4.0_grid/fixup.enable
Log file location: /tmp/CVU_11.2.0.4.0_grid/orarun.log
Setting Kernel Parameters...
The value for shmmni in response file is not greater than value of shmmni for current session. Hence not changing it.
The value for semmsl in response file is not greater than value of semmsl for current session. Hence not changing it.
The value for semmns in response file is not greater than value of semmns for current session. Hence not changing it.
The value for semmni in response file is not greater than value of semmni for current session. Hence not changing it.
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.wmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_max = 1048576
fs.aio-max-nr = 1048576
uid=1100(grid) gid=6000(oinstall) groups=6000(oinstall),5000(asmadmin),5001(asmdba),5002(asmoper)
运行完成后,点击Ok,系统再次进行检查。
保存响应文件。
进行安装。
提示执行脚本,按照步骤进行执行。
[root@rac1 ~]# /u01/app/oraInventory/orainstRoot.sh
Changing permissions of /u01/app/oraInventory.
Adding read,write permissions for group.
Removing read,write,execute permissions for world.
Changing groupname of /u01/app/oraInventory to oinstall.
The execution of the script is complete.
[root@rac1 ~]# /u01/app/11.2.0/grid/root.sh
Performing root user operation for Oracle 11g
The following environment variables are set as:
ORACLE_OWNER= grid
ORACLE_HOME= /u01/app/11.2.0/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: /u01/app/11.2.0/grid/crs/install/crsconfig_params
Creating trace directory
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 'rac1'
CRS-2676: Start of 'ora.mdnsd' on 'rac1' succeeded
CRS-2672: Attempting to start 'ora.gpnpd' on 'rac1'
CRS-2676: Start of 'ora.gpnpd' on 'rac1' succeeded
CRS-2672: Attempting to start 'ora.cssdmonitor' on 'rac1'
CRS-2672: Attempting to start 'ora.gipcd' on 'rac1'
CRS-2676: Start of 'ora.gipcd' on 'rac1' succeeded
CRS-2676: Start of 'ora.cssdmonitor' on 'rac1' succeeded
CRS-2672: Attempting to start 'ora.cssd' on 'rac1'
CRS-2672: Attempting to start 'ora.diskmon' on 'rac1'
CRS-2676: Start of 'ora.diskmon' on 'rac1' succeeded
CRS-2676: Start of 'ora.cssd' on 'rac1' succeeded
ASM created and started successfully.
Disk Group OCR 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 1c1ccc38f4c84f90bf3e0ef493a26c07.
Successfully replaced voting disk group with +OCR.
CRS-4256: Updating the profile
CRS-4266: Voting file(s) successfully replaced
## STATE File Universal Id File Name Disk group
-- ----- ----------------- --------- ---------
1. ONLINE 1c1ccc38f4c84f90bf3e0ef493a26c07 (/dev/raw/raw3) [OCR]
Located 1 voting disk(s).
CRS-2672: Attempting to start 'ora.asm' on 'rac1'
CRS-2676: Start of 'ora.asm' on 'rac1' succeeded
CRS-2672: Attempting to start 'ora.OCR.dg' on 'rac1'
CRS-2676: Start of 'ora.OCR.dg' on 'rac1' succeeded
Configure Oracle Grid Infrastructure for a Cluster ... succeeded
[root@rac2 ~]# /u01/app/oraInventory/orainstRoot.sh
Changing permissions of /u01/app/oraInventory.
Adding read,write permissions for group.
Removing read,write,execute permissions for world.
Changing groupname of /u01/app/oraInventory to oinstall.
The execution of the script is complete.
[root@rac2 ~]# /u01/app/11.2.0/grid/root.sh
Performing root user operation for Oracle 11g
The following environment variables are set as:
ORACLE_OWNER= grid
ORACLE_HOME= /u01/app/11.2.0/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: /u01/app/11.2.0/grid/crs/install/crsconfig_params
Creating trace directory
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 rac1, 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
执行完成后,点击Ok。
忽略最后的验证错误。导致这个错误的原因是在/etc/hosts中配置了SCAN的地址,尝试ping这个地址信息,如果可以成功,则这个错误可以忽略。
[root@rac1 ~]# ping 192.168.247.135
PING 192.168.247.135 (192.168.247.135) 56(84) bytes of data.
64 bytes from 192.168.247.135: icmp_seq=1 ttl=64 time=0.027 ms
64 bytes from 192.168.247.135: icmp_seq=2 ttl=64 time=0.024 ms
64 bytes from 192.168.247.135: icmp_seq=3 ttl=64 time=0.026 ms
^C
--- 192.168.247.135 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2440ms
rtt min/avg/max/mdev = 0.024/0.025/0.027/0.006 ms
[root@rac1 ~]# ping rac-scan
PING rac-scan (192.168.247.135) 56(84) bytes of data.
64 bytes from rac-scan (192.168.247.135): icmp_seq=1 ttl=64 time=0.040 ms
64 bytes from rac-scan (192.168.247.135): icmp_seq=2 ttl=64 time=0.045 ms
64 bytes from rac-scan (192.168.247.135): icmp_seq=3 ttl=64 time=0.024 ms
^C
--- rac-scan ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2613ms
rtt min/avg/max/mdev = 0.024/0.036/0.045/0.010 ms
分别在两个节点上查看如下信息:
(1)网卡信息
[root@rac1 ~]# ifconfig
eth0 Link encap:Ethernet HWaddr 00:0C:29:34:18:7F
inet addr:192.168.247.131 Bcast:192.168.247.255 Mask:255.255.255.0
inet6 addr: fe80::20c:29ff:fe34:187f/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:432887 errors:0 dropped:0 overruns:0 frame:0
TX packets:3263990 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:90814550 (86.6 MiB) TX bytes:4532033830 (4.2 GiB)
eth0:1 Link encap:Ethernet HWaddr 00:0C:29:34:18:7F
inet addr:192.168.247.133 Bcast:192.168.247.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
eth0:2 Link encap:Ethernet HWaddr 00:0C:29:34:18:7F
inet addr:192.168.247.135 Bcast:192.168.247.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
eth1 Link encap:Ethernet HWaddr 00:0C:29:34:18:89
inet addr:172.16.0.11 Bcast:172.16.0.255 Mask:255.255.255.0
inet6 addr: fe80::20c:29ff:fe34:1889/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:18394 errors:0 dropped:0 overruns:0 frame:0
TX packets:11100 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:7050353 (6.7 MiB) TX bytes:6464637 (6.1 MiB)
eth1:1 Link encap:Ethernet HWaddr 00:0C:29:34:18:89
inet addr:169.254.79.136 Bcast:169.254.255.255 Mask:255.255.0.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:11345 errors:0 dropped:0 overruns:0 frame:0
TX packets:11345 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:7553556 (7.2 MiB) TX bytes:7553556 (7.2 MiB)
[root@rac2 ~]# ifconfig
eth0 Link encap:Ethernet HWaddr 00:0C:29:81:1B:75
inet addr:192.168.247.132 Bcast:192.168.247.255 Mask:255.255.255.0
inet6 addr: fe80::20c:29ff:fe81:1b75/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:2951098 errors:0 dropped:0 overruns:0 frame:0
TX packets:135794 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:4364502330 (4.0 GiB) TX bytes:12461499 (11.8 MiB)
eth0:1 Link encap:Ethernet HWaddr 00:0C:29:81:1B:75
inet addr:192.168.247.134 Bcast:192.168.247.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
eth1 Link encap:Ethernet HWaddr 00:0C:29:81:1B:7F
inet addr:172.16.0.12 Bcast:172.16.0.255 Mask:255.255.255.0
inet6 addr: fe80::20c:29ff:fe81:1b7f/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:20222 errors:0 dropped:0 overruns:0 frame:0
TX packets:14903 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:8860272 (8.4 MiB) TX bytes:8624753 (8.2 MiB)
eth1:1 Link encap:Ethernet HWaddr 00:0C:29:81:1B:7F
inet addr:169.254.9.250 Bcast:169.254.255.255 Mask:255.255.0.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:5787 errors:0 dropped:0 overruns:0 frame:0
TX packets:5787 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:2521811 (2.4 MiB) TX bytes:2521811 (2.4 MiB)
(2)后台进程信息
[grid@rac1 grid]$ ps -ef|egrep -i "asm|listener"
grid 42014 1 0 19:51 ? 00:00:00 asm_pmon_+ASM1
grid 42016 1 0 19:51 ? 00:00:00 asm_psp0_+ASM1
grid 42018 1 1 19:51 ? 00:01:11 asm_vktm_+ASM1
grid 42022 1 0 19:51 ? 00:00:00 asm_gen0_+ASM1
grid 42024 1 0 19:51 ? 00:00:03 asm_diag_+ASM1
grid 42026 1 0 19:51 ? 00:00:00 asm_ping_+ASM1
grid 42028 1 0 19:51 ? 00:00:06 asm_dia0_+ASM1
grid 42030 1 0 19:51 ? 00:00:08 asm_lmon_+ASM1
grid 42032 1 0 19:51 ? 00:00:05 asm_lmd0_+ASM1
grid 42034 1 0 19:51 ? 00:00:13 asm_lms0_+ASM1
grid 42038 1 0 19:51 ? 00:00:00 asm_lmhb_+ASM1
grid 42040 1 0 19:51 ? 00:00:00 asm_mman_+ASM1
grid 42042 1 0 19:51 ? 00:00:00 asm_dbw0_+ASM1
grid 42044 1 0 19:51 ? 00:00:00 asm_lgwr_+ASM1
grid 42046 1 0 19:51 ? 00:00:00 asm_ckpt_+ASM1
grid 42048 1 0 19:51 ? 00:00:00 asm_smon_+ASM1
grid 42050 1 0 19:51 ? 00:00:01 asm_rbal_+ASM1
grid 42052 1 0 19:51 ? 00:00:00 asm_gmon_+ASM1
grid 42054 1 0 19:51 ? 00:00:00 asm_mmon_+ASM1
grid 42056 1 0 19:51 ? 00:00:00 asm_mmnl_+ASM1
grid 42058 1 0 19:51 ? 00:00:00 asm_lck0_+ASM1
grid 42108 1 0 19:51 ? 00:00:00 oracle+ASM1 (DESCRIPTION=(LOCAL=YES)(ADDRESS=(PROTOCOL=beq)))
grid 42133 1 0 19:51 ? 00:00:01 oracle+ASM1_ocr (DESCRIPTION=(LOCAL=YES)(ADDRESS=(PROTOCOL=beq)))
grid 42138 1 0 19:51 ? 00:00:00 asm_asmb_+ASM1
grid 42140 1 0 19:51 ? 00:00:00 oracle+ASM1_asmb_+asm1 (DESCRIPTION=(LOCAL=YES)(ADDRESS=(PROTOCOL=beq)))
grid 42645 1 0 19:52 ? 00:00:00 oracle+ASM1 (DESCRIPTION=(LOCAL=YES)(ADDRESS=(PROTOCOL=beq)))
grid 43130 1 0 19:53 ? 00:00:00 /u01/app/11.2.0/grid/bin/tnslsnr LISTENER_SCAN1 -inherit
grid 46617 1 0 20:12 ? 00:00:00 /u01/app/11.2.0/grid/bin/tnslsnr LISTENER -inherit
grid 58540 53617 0 21:05 pts/0 00:00:00 egrep -i asm|listener
(3)集群状态
[grid@rac1 grid]$ crsctl check crs
CRS-4638: Oracle High Availability Services is online
CRS-4537: Cluster Ready Services is online
CRS-4529: Cluster Synchronization Services is online
CRS-4533: Event Manager is online
(4)资源状态
[grid@rac1 grid]$ crsctl stat res -t
--------------------------------------------------------------------------------
NAME TARGET STATE SERVER STATE_DETAILS
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.DATA.dg
ONLINE ONLINE rac1
ONLINE ONLINE rac2
ora.LISTENER.lsnr
ONLINE ONLINE rac1
ONLINE ONLINE rac2
ora.asm
ONLINE ONLINE rac1 Started
ONLINE ONLINE rac2 Started
ora.gsd
OFFLINE OFFLINE rac1
OFFLINE OFFLINE rac2
ora.net1.network
ONLINE ONLINE rac1
ONLINE ONLINE rac2
ora.ons
ONLINE ONLINE rac1
ONLINE ONLINE rac2
ora.registry.acfs
ONLINE ONLINE rac1
ONLINE ONLINE rac2
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.LISTENER_SCAN1.lsnr
1 ONLINE ONLINE rac1
ora.cvu
1 ONLINE ONLINE rac1
ora.oc4j
1 ONLINE ONLINE rac1
ora.rac1.vip
1 ONLINE ONLINE rac1
ora.rac2.vip
1 ONLINE ONLINE rac2
ora.scan1.vip
1 ONLINE ONLINE rac1
(5)集群节点
[grid@rac1 grid]$ olsnodes -n
rac1 1
rac2 2
(6)集群版本
[grid@rac1 grid]$ crsctl query crs activeversion
Oracle Clusterware active version on the cluster is [11.2.0.4.0]
(7)集群注册文件
[grid@rac1 grid]$ ocrcheck
Status of Oracle Cluster Registry is as follows :
Version : 3
Total space (kbytes) : 262120
Used space (kbytes) : 2744
Available space (kbytes) : 259376
ID : 760182332
Device/File Name : +DATA
Device/File integrity check succeeded
Device/File not configured
Device/File not configured
Device/File not configured
Device/File not configured
Cluster registry integrity check succeeded
Logical corruption check bypassed due to non-privileged user
(8)检查votedisk
[grid@rac1 grid]$ crsctl query css votedisk
## STATE File Universal Id File Name Disk group
-- ----- ----------------- --------- ---------
1. ONLINE 928c8db2cb4f4f0abf52bf43726856e0 (/dev/asm-diskb) [DATA]
Located 1 voting disk(s).
(9)检查asm
[grid@rac1 grid]$ srvctl config asm -a
ASM home: /u01/app/11.2.0/grid
ASM listener: LISTENER
ASM is enabled.
[grid@rac1 ~]$ sqlplus / as sysasm
SQL*Plus: Release 11.2.0.4.0 Production on Sat Jul 11 21:22:44 2015
Copyright (c) 1982, 2013, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Real Application Clusters and Automatic Storage Management options
SQL> show parameter spfile
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
spfile string +OCR/rac-cluster/asmparameterf
ile/registry.253.908412843
SQL> select path from v$asm_disk;
PATH
--------------------------------------------------------------------------------
/dev/raw/raw2
/dev/raw/raw1
/dev/raw/raw3

































