千家信息网

oracle 11gr2 RAC virtualbox 安装

发表于:2024-11-27 作者:千家信息网编辑
千家信息网最后更新 2024年11月27日,[root@rac1 ~]# cat /home/oracle/.bash_profile # .bash_profile# Get the aliases and functionsif [ -f
千家信息网最后更新 2024年11月27日oracle 11gr2 RAC virtualbox 安装
[root@rac1 ~]# cat /home/oracle/.bash_profile # .bash_profile# Get the aliases and functionsif [ -f ~/.bashrc ]; then        . ~/.bashrcfi# User specific environment and startup programsPATH=$PATH:$HOME/binexport PATHTMP=/tmp; export TMPTMPDIR=$TMP; export TMPDIRORACLE_HOSTNAME=rac1; export ORACLE_HOSTNAMEORACLE_UNQNAME=RAC; export ORACLE_UNQNAMEORACLE_BASE=/u01/app/oracle; export ORACLE_BASEGRID_HOME=/u01/app/11.2.0.3/grid; export GRID_HOMEDB_HOME=$ORACLE_BASE/product/11.2.0.3/db_1; export DB_HOMEORACLE_HOME=$DB_HOME; export ORACLE_HOMEORACLE_SID=RAC1; export ORACLE_SIDORACLE_TERM=xterm; export ORACLE_TERMBASE_PATH=/usr/sbin:$PATH; export BASE_PATHPATH=$ORACLE_HOME/bin:$BASE_PATH; export PATHLD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib; export LD_LIBRARY_PATHCLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib; export CLASSPATHalias grid_env='. /home/oracle/grid_env'alias db_env='. /home/oracle/db_env'[root@rac1 ~]# cat /home/oracle/grid_envORACLE_SID=+ASM1; export ORACLE_SIDORACLE_HOME=$GRID_HOME; export ORACLE_HOMEPATH=$ORACLE_HOME/bin:$BASE_PATH; export PATHLD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib; export LD_LIBRARY_PATHCLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib; export CLASSPATH[root@rac1 ~]# cat /home/oracle/db_envORACLE_SID=RAC1; export ORACLE_SIDORACLE_HOME=$DB_HOME; export ORACLE_HOMEPATH=$ORACLE_HOME/bin:$BASE_PATH; export PATHLD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib; export LD_LIBRARY_PATHCLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib; export CLASSPATH[root@rac1 ~]# cat /etc/hosts127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4::1         localhost localhost.localdomain localhost6 localhost6.localdomain6#public192.168.56.7 rac2192.168.56.9 rac1#private192.168.176.7 rac2-priv192.168.176.5 rac1-priv#Virtual192.168.56.155 rac1-vip192.168.56.156 rac2-vip#scan192.168.56.157 rac-scan[root@rac1 ~]#


VBoxManage.exe createhd --filename D:\vmfile\racdisk\asm1.vdi --size 20480 --format VDI --variant Fixed

/sbin/scsi_id -g -u -d /dev/sdbvim /etc/udev/rules.d/99-oracle-asmdevices.rulesKERNEL=="sd?1", BUS=="scsi", PROGRAM=="/sbin/scsi_id -g -u -d /dev/$parent", RESULT=="1ATA_VBOX_HARDDISK_VBe4e11d02-5b820d3e",NAME="asm-disk1", OWNER="oracle", GROUP="dba", MODE="0660"注意放到同一行

/sbin/udevadm control --reload-rules/sbin/start_udev

设置rac2

[root@rac2 ~]# ls /dev/sd*/dev/sda  /dev/sda1  /dev/sda2  /dev/sdb  /dev/sdb1[root@rac2 ~]# vim /etc/udev/rules.d/99-oracle-asmdevices.rules

[root@rac2 ~]# /sbin/partprobe /dev/sdb1[root@rac2 ~]# /sbin/udevadm control --reload-rules[root@rac2 ~]# /sbin/start_udevStarting udev:                                             [  OK  ][root@rac2 ~]# ls -al /dev/asm*brw-rw---- 1 oracle dba 8, 17 Jul 10 10:39 /dev/asm-disk1

 重启两台机器在rac1 中进行图形化安装

依次执行,千万不要两台机器同时执行

返回图形化,点击ok继续

安装并创建数据库

0