Oracle 12C R1 RAC安装CRS
Oracle 12C R1 RAC install
此文当包含Oracle 12C R1 RAC真正应用集群的CRS安装
后续还会有DATABASE安装,NETCA及DBCA的整个过程 for 12cR1的RAC
推荐阅读:
本文只介绍CRS的安装过程
实验环境硬件介绍
华硕A43S笔记本
系统RHEL6.4_amd64
虚拟化解决方案:QEMU-KVM
节点(3个)配置如下:
系统:RHEL6.4_amd64
内存:1.8G
cpu:2
网卡:2
硬盘:40G
存储配置如下:
系统:RHEL6.4_amd64
内存:256M
cpu:1
网卡:1
硬盘:sda(10G,系统)
sdb(50G,共享)
sdc(60G,共享)
***************************************
注意:RHEL6.4在256M内存的环境下是安装不了的
笔者用的KVM虚拟化,所以安装的时候给512M的内存
安装完成后给其256M.
***************************************
系统架构描述如下:
节点(3个):CRS DATABASE 存储客户端 实例
提供ORACLE的实例和CRS的集群架构,共享存储从存储服务器挂载
存储:存储服务 DHCP DNS
提供共享存储服务供各个节点挂载,提供DNCP服务分发IP,提供DNS服务,解决SCAN的单客户端的解析。
系统规划如下:
hosts配置如下:
192.168.0.70 racst #存储服务器
192.168.0.71 rac1 #255.255.255.0
192.168.0.72 rac2
192.168.0.73 rac3
192.168.10.71 priv1 #255.255.255.0
192.168.10.72 priv2
192.168.10.73 priv3
共享磁盘配置如下:
由racst主机共享sdb和sdc两块磁盘
分区规划如下:
每个磁盘都分一个逻辑分区,在逻辑分区中分出5个主分区,详情如下
sda
adb5 4G
sdb6 4G
sdb7 10G
sdb8 10G
sdb9 20G
sdb
sdc5 4G
sdc6 5G
sdc7 10G
sdc8 20G
sdc9 20G
DHCP配置IP范围
必须和public接口的IP在同一段配置192.168.0.40~49/24
用户配置
笔者比较讨厌用户太多,所有从RAC创建到dbca结束,笔者打算只用两个组一个用户来解决问题
用户:oracle
群组:oinstall
dba
下边正式进行racst主机的配置
[root@racst ~]# sed -i s/"SELINUX=aaa"/"SELINUX=disabled"/g /etc/sysconfig/selinux && setenforce 0
[root@racst ~]# /etc/init.d/iptables stop && chkconfig iptables off
[root@racst ~]# mount /dev/cdrom /media/ #将系统盘挂载media目录下配置yum,以便安装所需的包
[root@racst ~]# cat /etc/yum.repos.d/rhel-source.repo |grep -v ^#|grep -v ^$ #配置repo文件如下即可
[rhel-source]
name=Red Hat Enterprise Linux $releasever - $basearch - Source
baseurl=file:///media
enabled=1
gpgcheck=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-RedHat-release
1.配置存储
[root@racst ~]# yum -y install iscsi-initiator-utils.x86_64 scsi-target-utils.x86_64 #安装iscsi的服务包
[root@racst ~]# tail -n 6 /etc/tgt/targets.conf #修改配置文件
<target iqn.rac:san.sdb>
backing-store /dev/vdb #共享存储为vdb
</target>
<target iqn.rac:san.sdc>
backing-store /dev/vdc #共享存储为vdc
</target>
[root@racst ~]# /etc/init.d/tgtd start #启动iscsi服务
正在启动 SCSI target daemon: [确定]
[root@racst ~]# tgtadm --mode target --op show #查看已经共享的磁盘信息
Target 1: iqn.rac:san.sdb
System information:
Driver: iscsi
State: ready
I_T nexus information:
LUN information:
LUN: 0
Type: controller
SCSI ID: IET 00010000
SCSI SN: beaf10
Size: 0 MB, Block size: 1
Online: Yes
Removable media: No
Prevent removal: No
Readonly: No
Backing store type: null
Backing store path: None
Backing store flags:
LUN: 1
Type: disk
SCSI ID: IET 00010001
SCSI SN: beaf11
Size: 53689 MB, Block size: 512
Online: Yes
Removable media: No
Prevent removal: No
Readonly: No
Backing store type: rdwr
Backing store path: /dev/vdb
Backing store flags:
Account information:
ACL information:
ALL
Target 2: iqn.rac:san.sdc
System information:
Driver: iscsi
State: ready
I_T nexus information:
LUN information:
LUN: 0
Type: controller
SCSI ID: IET 00020000
SCSI SN: beaf20
Size: 0 MB, Block size: 1
Online: Yes
Removable media: No
Prevent removal: No
Readonly: No
Backing store type: null
Backing store path: None
Backing store flags:
LUN: 1
Type: disk
SCSI ID: IET 00020001
SCSI SN: beaf21
Size: 64427 MB, Block size: 512
Online: Yes
Removable media: No
Prevent removal: No
Readonly: No
Backing store type: rdwr
Backing store path: /dev/vdc
Backing store flags:
Account information:
ACL information:
ALL
[root@racst ~]# chkconfig --level 3 tgtd on
存储配置已经OK!
2.配置DHCP
[root@racst ~]# yum -y install dhcp
[root@racst ~]# cat /etc/dhcp/dhcpd.conf
ddns-update-style none;
default-lease-time 259200;
max-lease-time 518400;
option broadcast-address 192.168.0.255; #广播地址
option domain-name-servers 192.168.0.70; #DNS服务器
subnet 192.168.0.0 netmask 255.255.255.0 {
range 192.168.0.40 192.168.0.59; #按以上规划40~49的范围
option subnet-mask 255.255.255.0; #子网掩码
option nis-domain "rac.com"; #域
option domain-name "rac.com";
}
[root@racst ~]# /etc/init.d/dhcpd start
正在启动 dhcpd: [确定]
[root@racst ~]# chkconfig --level 3 dhcpd on
至此DHCP服务配置成功!
3.配置DNS
[root@racst ~]# yum -y install bind-libs bind.x86_64 bind-utils.x86_64 bind-chroot.x86_64 #安装bind,以支持SCAN
[root@racst named]# cat /etc/named.conf |grep -v ^"//"|grep -v ^"$" #配置这个文件和笔者的相同(需要修改的笔者会注释出来)
options {
listen-on port 53 { any; }; #此处需要设置DNS所监听的本机IP,any是监听所有本机的IP地址
listen-on-v6 port 53 { ::1; };
directory "/var/named";
dump-file "/var/named/data/cache_dump.db";
statistics-file "/var/named/data/named_stats.txt";
memstatistics-file "/var/named/data/named_mem_stats.txt";
allow-query { 192.168.0.0/24; }; #允许处理来自这段IP的DNS请求
recursion yes;
dnssec-enable yes;
dnssec-validation yes;
dnssec-lookaside auto;
/* Path to ISC DLV key */
bindkeys-file "/etc/named.iscdlv.key";
managed-keys-directory "/var/named/dynamic";
};
logging {
channel default_debug {
file "data/named.run";
severity dynamic;
};
};
zone "." IN {
type hint;
file "named.ca";
};
################以下都是新添加的内容#################
zone "rac.com" IN {
type master;
file "rac.com.zone"; #此处的文件名省去了路径,应该是/var/named/rac.com.zone,正向解析区域。
allow-update { none; };
};
zone "0.168.192.in-addr.arpa" IN {
type master;
file "0.168.192.aptr"; #此处的文件名省去了路径,应该是/var/named/0.168.192.aptr,PTR方向解析区域。
allow-update { none; };
};
[root@racst ~]# cat /var/named/rac.com.zone #正向区域解析文件
$TTL 1D
@ IN SOA @ rname.invalid. (
0 ; serial
1D ; refresh
1H ; retry
1W ; expire
3H ) ; minimum
NS @
A 192.168.0.69
AAAA ::1
racst A 192.168.0.70
rac1 A 192.168.0.71
rac2 A 192.168.0.72
rac3 A 192.168.0.73
cluster IN 1H A 192.168.0.69
IN 1H A 192.168.0.71
IN 1H A 192.168.0.72
IN 1H A 192.168.0.73
[root@racst ~]# cat /var/named/0.168.192.aptr #反向区域解析文件
$TTL 1D
@ IN SOA @ rname.invalid. (
0 ; serial
1D ; refresh
1H ; retry
1W ; expire
3H ) ; minimum
NS rac.com.
A 192.168.0.69
AAAA ::1
70 PTR racst.rac.com.
71 PTR rac1.rac.com.
72 PTR rac2.rac.com.
73 PTR rac3.rac.com.
69 PTR cluster.rac.com.
71 PTR cluster.rac.com.
72 PTR cluster.rac.com.
73 PTR cluster.rac.com.
[root@racst ~]# rndc-confgen -r /dev/urandom -a
wrote key file "/etc/rndc.key"
[root@racst ~]# /etc/init.d/named start
启动 named: [确定]
[root@racst ~]# chkconfig --level 3 named on
DNS服务至此已经配置成功!