1. For details about how to configure the single-instance Environment, refer to renew.
1. Configure the single-instance Environment
Reference: http://www.linuxidc.com/Linux/2012-02/53042.htm
2. Configure domain name resolution
Vim/etc/hosts
127.0.0.1 localhost. localdomain localhost
192.168.2.101 rac1.localdomain rac1
192.168.2.102 rac2.localdomain rac2
192.168.0.101 rac1-priv.localdomain rac1-priv
192.168.0.102 rac2-priv.localdomain rac2-priv
192.168.2.111 rac1-vip.localdomain rac1-vip
192.168.2.112 rac2-vip.localdomain rac2-vip
3. Create an installation directory
Mkdir-p/u01/Oracle/crs
Mkdir-p/u01/oracle/10gR2
Chown-R oracle: oinstall/u01
Chmod-R 775/u01
4. Configure Environment Variables
Vi. bash_profile
Export ORACLE_SID = RAC1
Export ORACLE_BASE =/u01/oracle/10gR2
Export ORACLE_HOME =/u01/oracle/crs
Export PATH = $ ORACLE_HOME/bin: $ PATH
5. Create a shared Disk
Set path = C: \ Program Files \ Oracle \ VirtualBox; % path %
VBoxManage createhd -- filename ocr1.vdi -- size 256 -- format VDI -- variant Fixed
VBoxManage createhd -- filename ocr2.vdi -- size 256 -- format VDI -- variant Fixed
VBoxManage createhd -- filename vot1.vdi -- size 256 -- format VDI -- variant Fixed
VBoxManage createhd -- filename vot2.vdi -- size 256 -- format VDI -- variant Fixed
VBoxManage createhd -- filename vot3.vdi -- size 256 -- format VDI -- variant Fixed
VBoxManage createhd -- filename asm1.vdi -- size 5120 -- format VDI -- variant Fixed
VBoxManage createhd -- filename asm2.vdi -- size 5120 -- format VDI -- variant Fixed
VBoxManage createhd -- filename asm3.vdi -- size 5120 -- format VDI -- variant Fixed
6. associate a shared Disk
VBoxManage storageattach rac1 -- storagectl "SATA controller" -- port 1 -- device 0 -- type hdd -- medium ocr1.vdi -- mtype retriable
VBoxManage storageattach rac1 -- storagectl "SATA controller" -- port 2 -- device 0 -- type hdd -- medium ocr2.vdi -- mtype retriable
VBoxManage storageattach rac1 -- storagectl "SATA controller" -- port 3 -- device 0 -- type hdd -- medium vot1.vdi -- mtype retriable
VBoxManage storageattach rac1 -- storagectl "SATA controller" -- port 4 -- device 0 -- type hdd -- medium vot2.vdi -- mtype retriable
VBoxManage storageattach rac1 -- storagectl "SATA controller" -- port 5 -- device 0 -- type hdd -- medium vot3.vdi -- mtype retriable
VBoxManage storageattach rac1 -- storagectl "SATA controller" -- port 6 -- device 0 -- type hdd -- medium asm1.vdi -- mtype retriable
VBoxManage storageattach rac1 -- storagectl "SATA controller" -- port 7 -- device 0 -- type hdd -- medium asm2.vdi -- mtype retriable
VBoxManage storageattach rac1 -- storagectl "SATA controller" -- port 8 -- device 0 -- type hdd -- medium asm3.vdi -- mtype retriable
Http://www.oracledistilled.com/virtualbox/creating-shared-drives-in-oracle-vm-virtualbox/
7. configure a shared Disk
VBoxManage modifyhd ocr1.vdi -- type retriable
VBoxManage modifyhd ocr2.vdi -- type retriable
VBoxManage modifyhd vot1.vdi -- type retriable
VBoxManage modifyhd vot2.vdi -- type retriable
VBoxManage modifyhd vot3.vdi -- type retriable
VBoxManage modifyhd asm1.vdi -- type retriable
VBoxManage modifyhd asm2.vdi -- type retriable
VBoxManage modifyhd asm3.vdi -- type retriable
8. Clone the second Virtual Machine
Mkdir rac2
VBoxManage clonehd rac1 \ rac1.vdi rac2 \ rac2.vdi
Create a Virtual Machine Based on rac2.vdi.
VBoxManage storageattach rac2 -- storagectl "SATA controller" -- port 1 -- device 0 -- type hdd -- medium ocr1.vdi -- mtype retriable
VBoxManage storageattach rac2 -- storagectl "SATA controller" -- port 2 -- device 0 -- type hdd -- medium ocr2.vdi -- mtype retriable
VBoxManage storageattach rac2 -- storagectl "SATA controller" -- port 3 -- device 0 -- type hdd -- medium vot1.vdi -- mtype retriable
VBoxManage storageattach rac2 -- storagectl "SATA controller" -- port 4 -- device 0 -- type hdd -- medium vot2.vdi -- mtype retriable
VBoxManage storageattach rac2 -- storagectl "SATA controller" -- port 5 -- device 0 -- type hdd -- medium vot3.vdi -- mtype retriable
VBoxManage storageattach rac2 -- storagectl "SATA controller" -- port 6 -- device 0 -- type hdd -- medium asm1.vdi -- mtype retriable
VBoxManage storageattach rac2 -- storagectl "SATA controller" -- port 7 -- device 0 -- type hdd -- medium asm2.vdi -- mtype retriable
VBoxManage storageattach rac2 -- storagectl "SATA controller" -- port 8 -- device 0 -- type hdd -- medium asm3.vdi -- mtype retriable
9. Configure the environment variable of rac2
Vi. bash_profile
Export ORACLE_SID = RAC2
Export ORACLE_BASE =/u01/oracle/10gR2
Export ORACLE_HOME =/u01/oracle/crs
Export PATH = $ ORACLE_HOME/bin: $ PATH
10. Test domain name resolution
Ping-c 3 rac1
Ping-c 3 rac1-priv
Ping-c 3 rac2
Ping-c 3 rac2-priv