Rhel7.3_Oracle12cR2的RAC搭建安装


本次文档演示在Linux7环境安装Oracle12R2版本的RAC数据库。

 

安装环境:

虚拟机:vbox5.1

操作系统:rhel-server-7.3-x86_64

Grid集群安装包:linuxx64_12201_grid_home

DB数据库安装包:linuxx64_12201_database

 

IP划分如下:

Public-IP

192.168.56.101    ol7-122-rac1

192.168.56.102    ol7-122-rac2

Private-IP

192.168.1.101   ol7-122-rac1-priv

192.168.1.102   ol7-122-rac2-priv

Virtual-IP

192.168.56.103   ol7-122-rac1-vip

192.168.56.104   ol7-122-rac2-vip

Scan-IP    

192.168.56.105

192.168.56.106

192.168.56.107

附:dns为ol7-122-scan.fly.cn

 

ASM磁盘划分如下:

OCR  3块:asm-diskc  2G 、asm-diskd  2G、asm-diske  2G

GIMR 1块:asm-diskf  40G

数据   1块:asm-diskg  10G

 

 


一:linux配置


Linux安装时选项包如下:

  • Server with GUI
  • Hardware Monitoring Utilities
  • Large Systems Performance
  • Network file system client
  • Performance Tools
  • Compatibility Libraries
  • Development Tools

 

虚拟机配置如下:

 

先配置一台虚拟机(第一个节点 ol7-122-rac1)

 

内存设置6G

Rhel7.3_Oracle12cR2的RAC搭建安装_第1张图片


添加安装ORACLE软件盘 目录为:/u01

添加ASM存储盘(3块OCR,1块GIMR,1块存放数据)

Rhel7.3_Oracle12cR2的RAC搭建安装_第2张图片

 

设置网卡,网卡1位NAT方式

 Rhel7.3_Oracle12cR2的RAC搭建安装_第3张图片

 

网卡2为主机host-only方式(配置Public-IP)

 Rhel7.3_Oracle12cR2的RAC搭建安装_第4张图片

 

网卡3为内网方式(配置Private-IP)

Rhel7.3_Oracle12cR2的RAC搭建安装_第5张图片

 

 

 

二:安装前准备


修改 /etc/selinux/config配置

[root@ol7-122-rac1 ~]# vi /etc/selinux/config

SELINUX=disabled

关闭防火墙

[root@ol7-122-rac1 ~]# systemctl stop firewalld
[root@ol7-122-rac1 ~]# systemctl disable firewalld

配置内核参数:

[root@ol7-122-rac1 ~]# vi /etc/sysctl.conf
fs.file-max = 6815744
kernel.sem = 250 32000 100 128
kernel.shmmni = 4096
kernel.shmall = 1073741824
kernel.shmmax = 4398046511104
kernel.panic_on_oops = 1
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048576
net.ipv4.conf.all.rp_filter = 2
net.ipv4.conf.default.rp_filter = 2
fs.aio-max-nr = 1048576
net.ipv4.ip_local_port_range = 9000 65500

修改生效:
[root@ol7-122-rac1 ~]# /sbin/sysctl –p

修改系统限制参数

[root@ol7-122-rac1 ~]# vi /etc/security/limits.conf

oracle   soft    nofile   1024 
oracle   hard    nofile   65536 
oracle   soft    nproc    16384 
oracle   hard    nproc    16384 
oracle   soft    stack    10240 
oracle   hard    stack    32768
oracle   hard    memlock  134217728
oracle   soft    memlock  134217728

grid     soft    nofile   1024 
grid     hard    nofile   65536 
grid     soft    nproc    16384 
grid     hard    nproc    16384 
grid     soft    stack    10240
grid     hard    stack    32768
grid     hard    memlock  134217728
grid     soft    memlock  134217728

增加组和用户:

[root@ol7-122-rac1 ~]# groupadd -g 54321 oinstall
[root@ol7-122-rac1 ~]# groupadd -g 54322 dba
[root@ol7-122-rac1 ~]# groupadd -g 54323 oper
[root@ol7-122-rac1 ~]# groupadd -g 54324 backupdba
[root@ol7-122-rac1 ~]# groupadd -g 54325 dgdba
[root@ol7-122-rac1 ~]# groupadd -g 54326 kmdba
[root@ol7-122-rac1 ~]# groupadd -g 54327 asmdba
[root@ol7-122-rac1 ~]# groupadd -g 54328 asmoper
[root@ol7-122-rac1 ~]# groupadd -g 54329 asmadmin
[root@ol7-122-rac1 ~]# groupadd -g 54330 racdba

[root@ol7-122-rac1 ~]# useradd -u 54321 -g oinstall -G dba,asmdba,backupdba,dgdba,kmdba,racdba,oper oracle
[root@ol7-122-rac1 ~]# useradd -u 54322 -g oinstall -G asmadmin,asmdba,asmoper,dba grid

[root@ol7-122-rac1 ~]# passwd oracle
[root@ol7-122-rac1 ~]# passwd grid

增加ip地址:

[root@ol7-122-rac1 ~]# vi /etc/hosts

127.0.0.1  localhost localhost.localdomain localhost4 localhost4.localdomain4
::1        localhost localhost.localdomain localhost6 localhost6.localdomain6

# Public
192.168.56.101   ol7-122-rac1.localdomain        ol7-122-rac1
192.168.56.102   ol7-122-rac2.localdomain        ol7-122-rac2
# Private
192.168.1.101   ol7-122-rac1-priv.localdomain   ol7-122-rac1-priv
192.168.1.102   ol7-122-rac2-priv.localdomain   ol7-122-rac2-priv
# Virtual
192.168.56.103   ol7-122-rac1-vip.localdomain    ol7-122-rac1-vip
192.168.56.104   ol7-122-rac2-vip.localdomain    ol7-122-rac2-vip

查看网卡信息:

[root@ol7-122-rac1 ~]# ifconfig

enp0s3:flags=4163  mtu 1500
       ether 08:00:27:05:43:91 txqueuelen 1000  (Ethernet)
       RX packets 0  bytes 0 (0.0 B)
       RX errors 0  dropped 0  overruns 0 frame 0
       TX packets 0  bytes 0 (0.0 B)
       TX errors 0  dropped 0 overruns0  carrier 0  collisions 0

enp0s8:flags=4163  mtu 1500
       inet 192.168.56.101  netmask255.255.255.0  broadcast 192.168.56.255
       inet6 fe80::8194:7929:3e2a:e3fe prefixlen 64  scopeid0x20
       inet6 fe80::d240:aa50:b207:6807 prefixlen 64  scopeid0x20
       ether 08:00:27:45:6b:00 txqueuelen 1000  (Ethernet)
       RX packets 2155  bytes 237797(232.2 KiB)
       RX errors 0  dropped 0  overruns 0 frame 0
       TX packets 3191  bytes 843960(824.1 KiB)
       TX errors 0  dropped 0 overruns0  carrier 0  collisions 0

enp0s9:flags=4163  mtu 1500
       inet 192.168.1.101  netmask 255.255.255.0  broadcast 192.168.1.255
       inet6 fe80::a00:27ff:feb6:cb02 prefixlen 64  scopeid0x20
       ether 08:00:27:b6:cb:02 txqueuelen 1000  (Ethernet)
       RX packets 192  bytes 41461 (40.4KiB)
       RX errors 0  dropped 0  overruns 0 frame 0
       TX packets 1427  bytes 390596(381.4 KiB)
       TX errors 0  dropped 0 overruns0  carrier 0  collisions 0

lo:flags=73  mtu65536
       inet 127.0.0.1  netmask 255.0.0.0
       inet6 ::1  prefixlen 128  scopeid 0x10
       loop  txqueuelen 1  (Local Loopback)
       RX packets 360  bytes 71850 (70.1KiB)
       RX errors 0  dropped 0  overruns 0 frame 0
       TX packets 360  bytes 71850 (70.1KiB)
       TX errors 0  dropped 0 overruns0  carrier 0  collisions 0

virbr0:flags=4099 mtu 1500
       inet 192.168.122.1  netmask255.255.255.0  broadcast 192.168.122.255
       ether 52:54:00:51:3d:85 txqueuelen 1000  (Ethernet)
       RX packets 0  bytes 0 (0.0 B)
       RX errors 0  dropped 0  overruns 0 frame 0
       TX packets 0  bytes 0 (0.0 B)
       TX errors 0  dropped 0 overruns0  carrier 0  collisions 0

查看scanip的dns配置信息(具体配置可参考 点击打开链接)

[root@ol7-122-rac1 ~]# nslookup  ol7-122-scan.fly.cn

Server:         192.168.56.101
Address:        192.168.56.101#53

Name:  ol7-122-scan.fly.cn
Address: 192.168.56.106
Name:  ol7-122-scan.fly.cn
Address: 192.168.56.107
Name:  ol7-122-scan.fly.cn
Address: 192.168.56.105

建立文件路径

[root@ol7-122-rac1 ~]# mkdir -p /u01/app/12.2.0.1/grid
[root@ol7-122-rac1 ~]# mkdir -p /u01/app/grid
[root@ol7-122-rac1 ~]# mkdir -p /u01/app/oracle/product/12.2.0.1/db_1
[root@ol7-122-rac1 ~]# chown -R grid:oinstall /u01
[root@ol7-122-rac1 ~]# chmod -R 775 /u01/
[root@ol7-122-rac1 ~]# chown -R oracle:oinstall /u01/app/oracle

修改grid用户的环境变量

[root@ol7-122-rac1 ~]# su - grid
[grid@ol7-122-rac1 ~]$ cd

增加以下内容:
[grid@ol7-122-rac1 ~]$ vi .bash_profile

export ORACLE_BASE=/u01/app/grid
export ORACLE_HOME=/u01/app/12.2.0.1/grid
export ORACLE_SID=+ASM1         --注意rac2节点需要修改
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
umask=022

修改oracle用户的环境变量

[root@ol7-122-rac1 ~]# su - oracle
[oracle@ol7-122-rac1 ~]$ cd

增加以下内容:
[oracle@ol7-122-rac1 ~]$ vi .bash_profile

export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=/u01/app/oracle/product/12.2.0.1/db_1
export ORACLE_SID=orcl1           --注意rac2节点需要修改
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
umask=022

克隆rac1节点的虚拟机,为节点2   rac2

ip如下:

enp0s3:flags=4163  mtu 1500
       ether 08:00:27:da:14:cf txqueuelen 1000  (Ethernet)
       RX packets 0  bytes 0 (0.0 B)
       RX errors 0  dropped 0  overruns 0 frame 0
       TX packets 0  bytes 0 (0.0 B)
       TX errors 0  dropped 0 overruns0  carrier 0  collisions 0

enp0s8:flags=4163  mtu 1500
       inet 192.168.56.102  netmask255.255.255.0  broadcast 192.168.56.255
       inet6 fe80::d240:aa50:b207:6807 prefixlen 64  scopeid0x20
       ether 08:00:27:dc:2a:61 txqueuelen 1000  (Ethernet)
       RX packets 102  bytes 9763 (9.5KiB)
       RX errors 0  dropped 0  overruns 0 frame 0
       TX packets 537  bytes 56918 (55.5KiB)
       TX errors 0  dropped 0 overruns0  carrier 0  collisions 0

enp0s9:flags=4163  mtu 1500
       inet 192.168.1.102  netmask255.255.255.0  broadcast 192.168.1.255
       inet6 fe80::a00:27ff:febc:7e8b prefixlen 64  scopeid0x20
       ether 08:00:27:bc:7e:8b txqueuelen 1000  (Ethernet)
       RX packets 0  bytes 0 (0.0 B)
       RX errors 0  dropped 0  overruns 0 frame 0
       TX packets 403  bytes 59834 (58.4KiB)
       TX errors 0  dropped 0 overruns0  carrier 0  collisions 0

lo:flags=73  mtu65536
       inet 127.0.0.1  netmask 255.0.0.0
       inet6 ::1  prefixlen 128  scopeid 0x10
       loop  txqueuelen 1  (Local Loopback)
       RX packets 5654  bytes 14746367(14.0 MiB)
       RX errors 0  dropped 0  overruns 0 frame 0
       TX packets 5654  bytes 14746367(14.0 MiB)
       TX errors 0  dropped 0 overruns0  carrier 0  collisions 0

virbr0:flags=4099 mtu 1500
       inet 192.168.122.1  netmask255.255.255.0  broadcast 192.168.122.255
       ether 52:54:00:51:3d:85 txqueuelen 1000  (Ethernet)
       RX packets 0  bytes 0 (0.0 B)
       RX errors 0  dropped 0  overruns 0 frame 0
       TX packets 0  bytes 0 (0.0 B)
       TX errors 0  dropped 0 overruns0  carrier 0  collisions 0

修改grid环境变量如下:
export ORACLE_SID=+ASM2

 
修改oracle环境变量如下:
export ORACLE_SID=orcl2


修改rac1主机的磁盘介质类型,为共享类型

(以dg_1磁盘为例,OCR和GIMR同理修改)

 Rhel7.3_Oracle12cR2的RAC搭建安装_第6张图片

 

 

在rac2主机添加rac1的上面修改的共享磁盘(以dg_1磁盘为例,OCR和GIMR同理修改):

 Rhel7.3_Oracle12cR2的RAC搭建安装_第7张图片

 


设置SSH信任关系

基本步骤:

1)设置rac1的rsa和dsa加密,然后都追加到authorized_keys文件中

2)再把rac1的authorized_keys拷贝到rac2中

3)同样rac2的rsa和dsa加密,然后把rac2的rsa和dsa加密追加到authorized_keys文件中

4)再把rac2的authorized_keys文件拷贝到rac1中,覆盖之前的authorized_keys文件

1:这样的话rac1rac2authorized_keys文件中都有了彼此的rsadsa加密

2:需设置gridoracle两个用户(这里以oracle用户为例)

 

1、Rac1服务器设置:


(1)设置rsa和dsa加密:

[oracle@ol7-122-rac1 ~]$ ssh-keygen -t rsa
[oracle@ol7-122-rac1 ~]$ ssh-keygen -t dsa

(2)把rsa和dsa加密都放置到authorized_keys文件中:

[oracle@ol7-122-rac1 ~]$ cat .ssh/id_rsa.pub >> .ssh/authorized_keys
[oracle@ol7-122-rac1 ~]$ cat .ssh/id_dsa.pub >> .ssh/authorized_keys

(3)把rac1的authorized_keys拷贝到rac2中:

[oracle@ol7-122-rac1 ~]$ cd/home/oracle/.ssh

[oracle@ol7-122-rac1 .ssh]$ scp authorized_keys 192.168.56.102:/home/oracle/.ssh/ 


2、Rac2服务器设置:

(1)设置rsa和dsa加密:

[oracle@ol7-122-rac2 ~]$ ssh-keygen -t rsa
[oracle@ol7-122-rac2 ~]$ ssh-keygen -t dsa

(2)把rac2的rsa和dsa加密都放置到从rac1拷贝来的authorized_keys文件中:

[oracle@ol7-122-rac2 ~]$ cat .ssh/id_rsa.pub >> .ssh/authorized_keys
[oracle@ol7-122-rac2 ~]$ cat .ssh/id_dsa.pub >> .ssh/authorized_keys 

(3)把rac2中的authorized_keys文件拷贝到rac1中,覆盖之前的authorized_keys文件:

[oracle@ol7-122-rac2 ~]$ cd/home/oracle/.ssh
[oracle@ol7-122-rac2 .ssh]$ scp authorized_keys 192.168.56.101:/home/oracle/.ssh/


3、查看一下rac1和rac2相同的authorized_keys文件,如下:

[oracle@ol7-122-rac1 .ssh]$ more authorized_keys 

ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC/NgE63EfDoUOxn9tj9hGdD9h4c8nYWScEKsHDUEbzfqImSxoGd5AOQz4BysMQI2nez0ZxFfFwUsgb/qRsg2JG1VuD+AjNxI+SheXPzRR/yRQcnhlpuYLJx
o+8CzLApcli/u2yXOG9ZAPR65gXBXjUwZfi39ZXT/73zxEYGHvu37fBbglvOtSxTANYXhNgo87Ej8BO5hw/djcjVuw/NAiHpiOM285hh0FtcDqNHaodVsdNMlbZWS6dcqdDiD3gRvgcR4O9bGaa6P9GpIiLaV
F+cp50hcNAdwe9LAGY6Jp8thyXSKhfJsQgdyVUTa1syDUDfeqVVGenZhH+OR9bBerx [email protected]
ssh-dss AAAAB3NzaC1kc3MAAACBAMdYaS6X2/p+NE3Xc6sGCw/YYU+qkzPuJnV4w5kdPsE2FLFek8hbcMUs4W5J2ye+pg7tvygGNLn6rCyz0Ou13rGA+XnVYkbEL3Xh94QzeLEFxjD9U4pHddiyMyO8fT5VS
D4vWbGhNBKp64qqk+NSTXedSjRg8R0M/VAX+pL2FC0PAAAAFQC+DebpL/hQS3DyKa568YRX+3D3PQAAAIBPW1DC/3g6j0aK4hXglpNBmcr/Jqw7cQIUN/TLmfiMNDRztxdGmiTrkJWtbKPLfw+PKOesZyQlrM
U9aINuQUcOl/7OeJncxAIMlEOO2/R6U/7uOa4oqzMydMKYxmpx5y1ca31BjVSPb8c1jYBYciZ50DEZdqGvt+tfZm4F8aLjzAAAAIEAqHQ9Z3XzpkfT2iBkA8cq048YUMM0k6DEZ4Fgl3B0HmSpwSIARIEAqJe
aplK2ewlMfJiKUdj2GQO6ej8hdOWl0VvdPrhQEl4nUfMJzbACIRISDA1gsBGKRcflrrKYvsEfjWW5AkQnAAFP14Zhac/2MWD3GfUzyJyEGDGIZBjuWWU= [email protected]
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC/YA/e1Bkm32Z4VJtg9N+G5DvvLcXfq5+9iRWzUJkEQ/J0/sNoTTzQzUfN8yClm7WTy095gLrqn8X38wb36k9ooNH475gnbHgv584CYOzsxrlzz+RzXBGhb
PtA8MbeYqZnjPvo0ezH3k4/5VmF7zxVnrtm3JEYSXLC6cqVn4tx/4qrILbnPckKRlt0CeWYx07bULN39lni3uQuRJ83LTQ2H0E2WGguHsAQwH+sn9wBvs8swXK0OFOy0AHDHR/gR9gH8Lr1SGgeaqC1VQpCFt
bsRv7W1Ws6kIlF6pMY1n0wXrvCHbh5DJVV6orVZg6GPDRCmgLWcGoEXFmBgknlypYB [email protected]
ssh-dss AAAAB3NzaC1kc3MAAACBANSC+TmiMYFhb/aXYq2GmP1WfUKUtPaQYHVU+FrDQQfkJVGmnNfp4PXk/LFUppxBNWLhuVeKtrezO978eDCcI5N6ponxaoczJGDWmeFHI1UsKfF9l87m/Jnv2B5jw+YM1
CDjJLfE6HZAZhb6YFFFBVEfbNbEHO/WrkE2tHrOE2EdAAAAFQDzhSTw7Kd6kDz3gceM0yBnJXVqmwAAAIB8Nrr1JX2rTZGX8NELHvvdB9+h076C0n70lkjV8vcwjsY585a2TKbB7rsPGsOK0qYWQTg67hyQ6w
icQYMTnq6U4GIwLrrWAWzqO0c+GykZbLTYtRDAwD9CZEhtnhQNmg/IsBc1Uwl/L1sV8mAz/JErJQNNPuukhu5empSRi1Pw2QAAAIByKzk2HppjeLOetpMHdatpU+LKBZVK4PwFgJORMl4QNYgi1fVsCX/KEZH
Ft6RUcVMozdUuv2/Xwl00jwqTXUw23aStyOWUdR6pgXd3R9g2wdCJxRyLxL4LE9nOBVzSatYvD44w3IDYNXgDQ4hYx8xGOlk/u7MvjFQKZcuk+MtAvg== [email protected]


4、测试SSH:

Rac1和 rac2分别测试,可以正常返回日期即可:

[oracle@ol7-122-rac1 ~]$ ssh ol7-122-rac1 date
[oracle@ol7-122-rac1 ~]$ ssh ol7-122-rac1-priv date
[oracle@ol7-122-rac1 ~]$ ssh ol7-122-rac2 date
[oracle@ol7-122-rac1 ~]$ ssh ol7-122-rac2-priv date

 


绑定UDEV共享磁盘

添加共享磁盘顺序要一致

for i in c d e f g 
do
echo "KERNEL==\"sd?\",SUBSYSTEM==\"block\", PROGRAM==\"/usr/lib/udev/scsi_id--whitelisted --replace-whitespace --device=/dev/\$name\",RESULT==\"`/usr/lib/udev/scsi_id --whitelisted --replace-whitespace--device=/dev/sd$i`\", SYMLINK+=\"asm-disk$i\",OWNER=\"grid\", GROUP=\"asmadmin\",MODE=\"0660\""  >>/etc/udev/rules.d/99-oracle-asmdevices.rules
done

 
/sbin/partprobe /dev/sdc
/sbin/partprobe /dev/sdd
/sbin/partprobe /dev/sde
/sbin/partprobe /dev/sdf
/sbin/partprobe /dev/sdg


/sbin/udevadm test /sys/block/sdc
/sbin/udevadm test /sys/block/sdd
/sbin/udevadm test /sys/block/sde
/sbin/udevadm test /sys/block/sdf
/sbin/udevadm test /sys/block/sdg


[root@ol7-122-rac1 ~]# /sbin/udevadmcontrol --reload-rules


[root@ol7-122-rac1 ~]# ll /dev/asm*
lrwxrwxrwx 1 root root 3 Apr 19 17:15/dev/asm-diskc -> sdc
lrwxrwxrwx 1 root root 3 Apr 19 17:16/dev/asm-diskd -> sdd
lrwxrwxrwx 1 root root 3 Apr 19 17:16/dev/asm-diske -> sde
lrwxrwxrwx 1 root root 3 Apr 19 17:16/dev/asm-diskf -> sdf
lrwxrwxrwx 1 root root 3 Apr 19 17:16/dev/asm-diskg -> sdg


[root@ol7-122-rac1 ~]# ll /dev/sd*
brw-rw---- 1 root disk     8, 0 Apr 19 16:47 /dev/sda
brw-rw---- 1 root disk     8, 1 Apr 19 16:47 /dev/sda1
brw-rw---- 1 root disk     8, 2 Apr 19 16:47 /dev/sda2
brw-rw---- 1 root disk     8, 3 Apr 19 16:47 /dev/sda3
brw-rw---- 1 root disk     8, 16 Apr 19 16:47 /dev/sdb
brw-rw---- 1 root disk     8, 17 Apr 19 16:47 /dev/sdb1
brw-rw---- 1 grid asmadmin 8, 32 Apr 1917:18 /dev/sdc
brw-rw---- 1 grid asmadmin 8, 48 Apr 1917:18 /dev/sdd
brw-rw---- 1 grid asmadmin 8, 64 Apr 1917:18 /dev/sde
brw-rw---- 1 grid asmadmin 8, 80 Apr 1917:18 /dev/sdf
brw-rw---- 1 grid asmadmin 8, 96 Apr 1917:18 /dev/sdg

 

三:安装GRID软件

解压grid安装包
[grid@ol7-122-rac1 ~]$ cd /u01/app/12.2.0.1/grid/                      
[grid@ol7-122-rac1 grid]$ unzip linuxx64_12201_grid_home.zip
 
安装grid前检查
[grid@ol7-122-rac1 grid]$ ./runcluvfy.sh stage -pre crsinst -n ol7-122-rac1,ol7-122-rac2 -verbose

安装grid
[grid@ol7-122-rac1 grid]$ ./gridSetup.sh

Rhel7.3_Oracle12cR2的RAC搭建安装_第8张图片 Rhel7.3_Oracle12cR2的RAC搭建安装_第9张图片 Rhel7.3_Oracle12cR2的RAC搭建安装_第10张图片

 Rhel7.3_Oracle12cR2的RAC搭建安装_第11张图片Rhel7.3_Oracle12cR2的RAC搭建安装_第12张图片Rhel7.3_Oracle12cR2的RAC搭建安装_第13张图片

 Rhel7.3_Oracle12cR2的RAC搭建安装_第14张图片Rhel7.3_Oracle12cR2的RAC搭建安装_第15张图片Rhel7.3_Oracle12cR2的RAC搭建安装_第16张图片Rhel7.3_Oracle12cR2的RAC搭建安装_第17张图片Rhel7.3_Oracle12cR2的RAC搭建安装_第18张图片Rhel7.3_Oracle12cR2的RAC搭建安装_第19张图片Rhel7.3_Oracle12cR2的RAC搭建安装_第20张图片Rhel7.3_Oracle12cR2的RAC搭建安装_第21张图片Rhel7.3_Oracle12cR2的RAC搭建安装_第22张图片Rhel7.3_Oracle12cR2的RAC搭建安装_第23张图片

 Rhel7.3_Oracle12cR2的RAC搭建安装_第24张图片Rhel7.3_Oracle12cR2的RAC搭建安装_第25张图片Rhel7.3_Oracle12cR2的RAC搭建安装_第26张图片Rhel7.3_Oracle12cR2的RAC搭建安装_第27张图片

 Rhel7.3_Oracle12cR2的RAC搭建安装_第28张图片Rhel7.3_Oracle12cR2的RAC搭建安装_第29张图片Rhel7.3_Oracle12cR2的RAC搭建安装_第30张图片Rhel7.3_Oracle12cR2的RAC搭建安装_第31张图片

 Rhel7.3_Oracle12cR2的RAC搭建安装_第32张图片Rhel7.3_Oracle12cR2的RAC搭建安装_第33张图片Rhel7.3_Oracle12cR2的RAC搭建安装_第34张图片

 

 

 查看集群状态

[grid@ol7-122-rac1 ~]$ crsctl stat res -t

--------------------------------------------------------------------------------
Name           Target  State       Server                   Statedetails      
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.ASMNET1LSNR_ASM.lsnr
               ONLINE  ONLINE      ol7-122-rac1             STABLE
               ONLINE  ONLINE      ol7-122-rac2             STABLE
ora.DG_MGMT.dg
               ONLINE  ONLINE      ol7-122-rac1             STABLE
               ONLINE  ONLINE      ol7-122-rac2             STABLE
ora.DG_OCR.dg
               ONLINE  ONLINE      ol7-122-rac1             STABLE
               ONLINE  ONLINE      ol7-122-rac2             STABLE
ora.LISTENER.lsnr
               ONLINE  ONLINE      ol7-122-rac1             STABLE
               ONLINE  ONLINE      ol7-122-rac2             STABLE
ora.chad
               ONLINE  ONLINE      ol7-122-rac1             STABLE
               ONLINE  ONLINE      ol7-122-rac2             STABLE
ora.net1.network
               ONLINE  ONLINE      ol7-122-rac1             STABLE
               ONLINE  ONLINE      ol7-122-rac2             STABLE
ora.ons
               ONLINE  ONLINE      ol7-122-rac1             STABLE
               ONLINE  ONLINE      ol7-122-rac2             STABLE
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.LISTENER_SCAN1.lsnr
     1        ONLINE  ONLINE      ol7-122-rac2             STABLE
ora.LISTENER_SCAN2.lsnr
     1        ONLINE  ONLINE      ol7-122-rac1             STABLE
ora.LISTENER_SCAN3.lsnr
      1       ONLINE  ONLINE       ol7-122-rac1             STABLE
ora.MGMTLSNR
     1        ONLINE  ONLINE      ol7-122-rac1             169.254.84.228192.1
                                                            68.1.101,STABLE
ora.asm
     1        ONLINE ONLINE       ol7-122-rac1             Started,STABLE
     2        ONLINE  ONLINE      ol7-122-rac2             Started,STABLE
     3        OFFLINE OFFLINE                               STABLE
ora.cvu
     1        ONLINE  ONLINE      ol7-122-rac1             STABLE
ora.mgmtdb
     1        ONLINE  ONLINE      ol7-122-rac1             Open,STABLE
ora.ol7-122-rac1.vip
     1        ONLINE  ONLINE      ol7-122-rac1             STABLE
ora.ol7-122-rac2.vip
     1        ONLINE  ONLINE      ol7-122-rac2             STABLE
ora.qosmserver
     1        ONLINE  ONLINE      ol7-122-rac1             STABLE
ora.scan1.vip
     1        ONLINE  ONLINE      ol7-122-rac2             STABLE
ora.scan2.vip
     1        ONLINE  ONLINE      ol7-122-rac1             STABLE
ora.scan3.vip
      1       ONLINE  ONLINE       ol7-122-rac1             STABLE



配置asm


[grid@ol7-122-rac1 grid]$ asmca


 Rhel7.3_Oracle12cR2的RAC搭建安装_第35张图片Rhel7.3_Oracle12cR2的RAC搭建安装_第36张图片Rhel7.3_Oracle12cR2的RAC搭建安装_第37张图片Rhel7.3_Oracle12cR2的RAC搭建安装_第38张图片

 

 

四:安装ORACLE软件

解压oracle安装包
[oracle@ol7-122-rac1 oracle]$  unzip linuxx64_12201_database.zip

安装
[oracle@ol7-122-rac1 oracle]$ ./runInstaller
Rhel7.3_Oracle12cR2的RAC搭建安装_第39张图片 Rhel7.3_Oracle12cR2的RAC搭建安装_第40张图片 Rhel7.3_Oracle12cR2的RAC搭建安装_第41张图片 Rhel7.3_Oracle12cR2的RAC搭建安装_第42张图片

 Rhel7.3_Oracle12cR2的RAC搭建安装_第43张图片Rhel7.3_Oracle12cR2的RAC搭建安装_第44张图片Rhel7.3_Oracle12cR2的RAC搭建安装_第45张图片Rhel7.3_Oracle12cR2的RAC搭建安装_第46张图片Rhel7.3_Oracle12cR2的RAC搭建安装_第47张图片Rhel7.3_Oracle12cR2的RAC搭建安装_第48张图片Rhel7.3_Oracle12cR2的RAC搭建安装_第49张图片Rhel7.3_Oracle12cR2的RAC搭建安装_第50张图片

 

 

五:安装数据库


[oracle@ol7-122-rac1 ~]$ dbca

Rhel7.3_Oracle12cR2的RAC搭建安装_第51张图片Rhel7.3_Oracle12cR2的RAC搭建安装_第52张图片Rhel7.3_Oracle12cR2的RAC搭建安装_第53张图片Rhel7.3_Oracle12cR2的RAC搭建安装_第54张图片Rhel7.3_Oracle12cR2的RAC搭建安装_第55张图片Rhel7.3_Oracle12cR2的RAC搭建安装_第56张图片Rhel7.3_Oracle12cR2的RAC搭建安装_第57张图片Rhel7.3_Oracle12cR2的RAC搭建安装_第58张图片Rhel7.3_Oracle12cR2的RAC搭建安装_第59张图片Rhel7.3_Oracle12cR2的RAC搭建安装_第60张图片Rhel7.3_Oracle12cR2的RAC搭建安装_第61张图片Rhel7.3_Oracle12cR2的RAC搭建安装_第62张图片

 Rhel7.3_Oracle12cR2的RAC搭建安装_第63张图片Rhel7.3_Oracle12cR2的RAC搭建安装_第64张图片Rhel7.3_Oracle12cR2的RAC搭建安装_第65张图片Rhel7.3_Oracle12cR2的RAC搭建安装_第66张图片Rhel7.3_Oracle12cR2的RAC搭建安装_第67张图片

 


查看集群状态

[grid@ol7-122-rac1 ~]$ srvctl config database -d orcl

Database unique name: orcl
Database name: orcl
Oracle home: /u01/app/oracle/product/12.2.0.1/db_1
Oracle user: oracle
Spfile: +DG_DATA/ORCL/PARAMETERFILE/spfile.272.942322245
Password file: +DG_DATA/ORCL/PASSWORD/pwdorcl.256.942319377
Domain:
Start options: open
Stop options: immediate
Database role: PRIMARY
Management policy: AUTOMATIC
Server pools:
Disk Groups: DG_DATA
Mount point paths:
Services:
Type: RAC
Start concurrency:
Stop concurrency:
OSDBA group: dba
OSOPER group: oper
Database instances: orcl1,orcl2
Configured nodes: ol7-122-rac1,ol7-122-rac2
CSS critical: no
CPU count: 0
Memory target: 0
Maximum memory: 0
Default network number for database services:
Database is administrator managed

 
[grid@ol7-122-rac1 ~]$ srvctl status database -d orcl

Instance orcl1 is running on node ol7-122-rac1
Instance orcl2 is running on node ol7-122-rac2

你可能感兴趣的:(Oracle,安装卸载,Oracle,高可用及容灾)