10、设置环境变量 grid用户PATH=$PATH:$HOME/bin
[root@rac02 ~]# su - grid
[grid@rac02 ~]$ vi .bash_profile
export Oracle_BASE=/u01/app/grid
export ORACLE_HOME=/u01/app/12.1.0/grid
export ORACLE_SID=+ASM
export PATH=$ORACLE_HOME/bin:$PATH
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
export CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib
export DISPLAY=:0.0
umask=022
[root@rac02 ~]# su - oracle
[oracle@rac02 ~]$ vi .bash_profile
PATH=$PATH:$HOME/bin
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=/u01/app/oracle/product/12.1.0/db_1
export ORACLE_SID=orcl2
export PATH=$ORACLE_HOME/bin:$PATH
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
export CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib
export DISPLAY=:0.0
umask=022
export PATH
11、配置ASM依次安装
oracleasm-support-2.1.8-1.el6.x86_64.rpm
kmod-oracleasm-2.0.6.rh1-2.el6.x86_64.rpm
oracleasmlib-2.0.4-1.el6.x86_64.rpm
对磁盘进行分区(一个节点上执行)
[root@rac02 ~]# fdisk -l
Disk /dev/sda: 53.7 GB, 53687091200 bytes
64 heads, 32 sectors/track, 51200 cylinders
Units = cylinders of 2048 * 512 = 1048576 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000588f1
Device Boot Start End Blocks Id System
/dev/sda1 * 2 151 153600 83 Linux
Partition 1 does not end on cylinder boundary.
/dev/sda2 152 10391 10485760 83 Linux
Partition 2 does not end on cylinder boundary.
/dev/sda3 10392 12439 2097152 82 Linux swap / Solaris
Partition 3 does not end on cylinder boundary.
/dev/sda4 12440 51200 39691264 5 Extended
Partition 4 does not end on cylinder boundary.
/dev/sda5 12441 51200 39690240 83 Linux
Disk /dev/sdb: 16.1 GB, 16106127360 bytes
64 heads, 32 sectors/track, 15360 cylinders
Units = cylinders of 2048 * 512 = 1048576 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
Disk /dev/sdc: 16.1 GB, 16106127360 bytes
64 heads, 32 sectors/track, 15360 cylinders
Units = cylinders of 2048 * 512 = 1048576 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
Disk /dev/sdd: 42.9 GB, 42949672960 bytes
64 heads, 32 sectors/track, 40960 cylinders
Units = cylinders of 2048 * 512 = 1048576 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
分区后的磁盘信息
Device Boot Start End Blocks Id System
/dev/sdb1 1 15360 15728624 83 Linux
Disk /dev/sdc: 16.1 GB, 16106127360 bytes
64 heads, 32 sectors/track, 15360 cylinders
Units = cylinders of 2048 * 512 = 1048576 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x9c8ae290
Device Boot Start End Blocks Id System
/dev/sdc1 1 15360 15728624 83 Linux
Disk /dev/sdd: 42.9 GB, 42949672960 bytes
64 heads, 32 sectors/track, 40960 cylinders
Units = cylinders of 2048 * 512 = 1048576 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x4c33655b
Device Boot Start End Blocks Id System
/dev/sdd1 1 40960 41943024 83 Linux
[root@rac01 u01]# /etc/init.d/oracleasm scandisks
Scanning the system for Oracle ASMLib disks: [ OK ]
[root@rac01 u01]# /etc/init.d/oracleasm listdisks
CRS
DATA
FLA