[root@rac1 ~]# cat /home/oracle/.bash_profile
# .bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
# User specific environment and startup programs
PATH=$PATH:$HOME/bin
export PATH
TMP=/tmp; export TMP
TMPDIR=$TMP; export TMPDIR
ORACLE_HOSTNAME=rac1; export ORACLE_HOSTNAME
ORACLE_UNQNAME=RAC; export ORACLE_UNQNAME
ORACLE_BASE=/u01/app/oracle; export ORACLE_BASE
GRID_HOME=/u01/app/11.2.0.3/grid; export GRID_HOME
DB_HOME=$ORACLE_BASE/product/11.2.0.3/db_1; export DB_HOME
ORACLE_HOME=$DB_HOME; export ORACLE_HOME
ORACLE_SID=RAC1; export ORACLE_SID
ORACLE_TERM=xterm; export ORACLE_TERM
BASE_PATH=/usr/sbin:$PATH; export BASE_PATH
PATH=$ORACLE_HOME/bin:$BASE_PATH; export PATH
LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib; export LD_LIBRARY_PATH
CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib; export CLASSPATH
alias grid_env='. /home/oracle/grid_env'
alias db_env='. /home/oracle/db_env'
[root@rac1 ~]# cat /home/oracle/grid_env
ORACLE_SID=+ASM1; export ORACLE_SID
ORACLE_HOME=$GRID_HOME; export ORACLE_HOME
PATH=$ORACLE_HOME/bin:$BASE_PATH; export PATH
LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib; export LD_LIBRARY_PATH
CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib; export CLASSPATH
[root@rac1 ~]# cat /home/oracle/db_env
ORACLE_SID=RAC1; export ORACLE_SID
ORACLE_HOME=$DB_HOME; export ORACLE_HOME
PATH=$ORACLE_HOME/bin:$BASE_PATH; export PATH
LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib; export LD_LIBRARY_PATH
CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib; export CLASSPATH
[root@rac1 ~]# cat /etc/hosts
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
#public
192.168.56.7 rac2
192.168.56.9 rac1
#private
192.168.176.7 rac2-priv
192.168.176.5 rac1-priv
#Virtual
192.168.56.155 rac1-vip
192.168.56.156 rac2-vip
#scan
192.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/sdb
vim /etc/udev/rules.d/99-oracle-asmdevices.rules
KERNEL=="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_udev
Starting udev: [ OK ]
[root@rac2 ~]# ls -al /dev/asm*
brw-rw---- 1 oracle dba 8, 17 Jul 10 10:39 /dev/asm-disk1
重启两台机器 在rac1 中进行图形化安装
依次执行,千万不要两台机器同时执行
返回图形化,点击ok继续
安装并创建数据库
亿速云「云服务器」,即开即用、新一代英特尔至强铂金CPU、三副本存储NVMe SSD云盘,价格低至29元/月。点击查看>>
免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。