This installation of RAC is a little rough .....
Prerequisites for installing a RAC
Add NIC: Connection Method host-only
Configure the ip Address:
Node1
Eth0: 192.168.0.2
Eth1: 192.168.1.3
Vip: 192.168.0.10
Node2
Eth0: 192.168.0.3
Eth1: 192.168.1.4
Vip: 192.168.0.20
Configure/etc/hosts
127.0.0.1localhost
192.168.0.2rac1rac1-public
192.168.1.3rac1-priv
192.168.0.10rac1-vip
192.168.0.3rac2rac2-public
192.168.1.3rac2-priv
192.168.0.20rac2-vip
192.168.0.254rac-scan
Add User Group:
Groupadd-g1000oinstall
Groupadd-g1200asmadmin
Groupadd-g1201asmdba
Groupadd-g1202asmoper
Groupadd-g1300dba
Groupadd-g1301oper
Useradd-m-u1100-goinstall-Gasmadmin, asmdba, asmoper, dba-d/home/gridgrid
Useradd-m-u1101-goinstall-Gdba, Oracle, asmdba-d/home/oracleoracle
Gpasswd-mongoddba
Gpasswd-mongoddba
Idoracle
Idgrid
Passwdoracle
Passwdgrid
Mkdir-p/u01/app/grid/11.2.0
Mkdir-p/u01/grid
Chown-Rgrid: oinstall/u01
Mkdir-R/u01/app/oracle/11.2.0/db_1
Mkdir-p/u01/app/oracle/11.2.0/db_1
Chown-Roracle: oinstall/u01
Chmod-R775/u01/
-- The two nodes must be the same
Ssh mutual trust
Switch to oracle user
/Usr/bin/ssh-keygen-trsa
/Usr/bin/ssh-keygen-tdsa
Note: Both nodes must be executed.
After the execution, there are two files under/home/oracle/. ssh /.
Id_dsa.pubid_rsa.pub
Both nodes have
Then, send the two files on one node to another node.
Scpid_dsa.pubrac2:/home/oracle/. ssh/id_dsa.pub2
Scpid_rsa.pubrac2:/home/oracle/. ssh/id_rsa.pub2
At this time, there are four files on node 2.
Catid_rsa.pubid_rsa.pub2id_dsa.pubid_dsa.pub2> authorized_keys
Generate the authorized_keys File
Then upload the file to another node.
Scpauthorized_keysrac1:/home/oracle/. ssh/
Start test:
Sshrac1privdate
Sshrac1date
Sshrac2privdate
Sshrac2date
Environment variables:
Node2_grid:
# ExportORACLE_SID = + ASM1
ExportORACLE_SID = + ASM2
ExportORACLE_BASE =/u01/grid
ExportORACLE_HOME =/u01/app/grid/11.2.0
ExportPATH = $ ORACLE_HOME/bin: $ PATH :.
ExportTEMP =/tmp
ExportTMP =/tmp
ExportTMPDIR =/tmp
Umask022
Oracle:
# ExportORACLE_SID = rac1
ExportORACLE_SID = rac2
ExportORACLE_UNQNAME = rac
ExportORACLE_BASE =/u01/app/oracle
ExportORACLE_HOME =/u01/app/oracle/11.2.0/db_1
ExportORACLE_TERM = xterm
ExportNLS_DATE_FORMAT = "YYYY-MM-DDHH24: MI: SS"
ExportPATH =$ {PATH }:$ ORACLE_HOME/bin :.
ExportTEMP =/tmp
ExportTMP =/tmp
Umask022
Node1_grid:
ExportORACLE_SID = + ASM1
# ExportORACLE_SID = + ASM2
ExportORACLE_BASE =/u01/grid
ExportORACLE_HOME =/u01/app/grid/11.2.0
ExportPATH = $ ORACLE_HOME/bin: $ PATH :.
ExportTEMP =/tmp
ExportTMP =/tmp
ExportTMPDIR =/tmp
Umask022
Oracle:
ExportORACLE_SID = rac1
# ExportORACLE_SID = rac2
ExportORACLE_UNQNAME = rac
ExportORACLE_BASE =/u01/app/oracle
ExportORACLE_HOME =/u01/app/oracle/11.2.0/db_1
ExportORACLE_TERM = xterm
ExportNLS_DATE_FORMAT = "YYYY-MM-DDHH24: MI: SS"
ExportPATH =$ {PATH }:$ ORACLE_HOME/bin :.
ExportTEMP =/tmp
ExportTMP =/tmp
Umask022
Shared disk configuration:
Create a shared disk first:
Vmware-vdiskmanager.exe-c-s5120MB-alsilogic-t2 "d: \ sharedisk \ sharedisk01.vmdk"
Vmware-vdiskmanager.exe-c-s5120MB-alsilogic-t2 "d: \ sharedisk \ sharedisk02.vmdk"
Vmware-vdiskmanager.exe-c-s5120MB-alsilogic-t2 "d: \ sharedisk \ sharedisk03.vmdk"
Vmware-vdiskmanager.exe-c-s5120MB-alsilogic-t2 "d: \ sharedisk \ sharedisk04.vmdk"
Vmware-vdiskmanager.exe-c-s5120MB-alsilogic-t2 "d: \ sharedisk \ sharedisk05.vmdk"
Then add the disk to the two nodes one by one.
After adding
Open. vmx
Add:
Disk. EnableUUID = "TRUE"
DiskLib. dataCacheMaxSize = "0"
DiskLib. datachemaxreadaheadsize = "0"
DiskLib. dataCacheMinReadAheadSize = "0"
DiskLib. dataCachePageSize = "4096"
DiskLib. maxUnsyncedWrites = "0"
Disk. locking = "FALSE"
Scsi1: 0. SharedBus = "Virtual"
Scsi1: 1. SharedBus = "Virtual"
Scsi1: 2. SharedBus = "Virtual"
Scsi1: 3. SharedBus = "Virtual"
Scsi1: 4. SharedBus = "Virtual"
Open a virtual machine
Configure UDEV
Mine is oraclelinux5.8
/Sbin/scsi_id-g-u-s/block/sdb
// Sbin/scsi_id-g-u-s/block/sdc
// Sbin/scsi_id-g-u-s/block/sdd
// Sbin/scsi_id-g-u-s/block/sde
// Sbin/scsi_id-g-u-s/block/sdf
Then add 99-oracle-asmdevices.rules
/Etc/udev/rules. d/99-oracle-asmdevices.rules
Content:
KERNEL = "sd *", BUS = "scsi", PROGRAM = "/sbin/scsi_id-g-u-s % p", RESULT = "36000c29732fadfd3ff9fa212d1de2e2e ", NAME = "asm-diskb", OWNER = "grid", GROUP = "asmadmin", MODE = "0660"
KERNEL = "sd *", BUS = "scsi", PROGRAM = "/sbin/scsi_id-g-u-s % p", RESULT = "36000c29e184787560400153bb251c16f ", NAME = "asm-diskc", OWNER = "grid", GROUP = "asmadmin", MODE = "0660"
KERNEL = "sd *", BUS = "scsi", PROGRAM = "/sbin/scsi_id-g-u-s % p", RESULT = "36000c29a1a5b2e2a3962ab90b3aa25ee ", NAME = "asm-diskd", OWNER = "grid", GROUP = "asmadmin", MODE = "0660"
KERNEL = "sd *", BUS = "scsi", PROGRAM = "/sbin/scsi_id-g-u-s % p", RESULT = "36000c295d404bac8bb9c00f8f7d60a32 ", NAME = "asm-diske", OWNER = "grid", GROUP = "asmadmin", MODE = "0660"
KERNEL = "sd *", BUS = "scsi", PROGRAM = "/sbin/scsi_id-g-u-s % p", RESULT = "36000c2961f7aca1c95c4224f761666e7 ", NAME = "asm-diskf", OWNER = "grid", GROUP = "asmadmin", MODE = "0660"
After being configured on one node, it is passed to another node.
Scp99-oracle-asmdevices.rulesrac2:/etc/udev/rules. d/
Restart udev
/Sbin/start_udev
Then execute
Ll/dev/asm *
You can see .....
This takes two days ,,,,
If the system is in oraclelinux5, the content in the file 99-oracle-asmdevices.rules must be the same as the above ...... Otherwise, the asm disk cannot be found.
Install grid
This article is from the "Qian Hong" blog and will not be reposted!