ORACLE RAC用DNS服务器的配置

一、搭建本地YUM源

二、安装DNS全部组建

yum -y install bind*

三、规划您RAC集群所有IP

#public

192.168.16.111 rac1.ntt.com rac1

192.168.16.112 rac2.ntt.com rac2

192.168.16.121 rac3.ntt.com rac3

192.168.16.122 rac4.ntt.com rac4

#private

10.10.10.111 rac1-priv.ntt.com rac1-priv

10.10.10.112 rac2-priv.ntt.com rac2-priv

10.10.10.121 rac3-priv.ntt.com rac3-priv

10.10.10.122 rac4-priv.ntt.com rac4-priv

#vip

192.168.16.113 rac1-vip.ntt.com rac1-vip

192.168.16.114 rac2-vip.ntt.com rac2-vip

192.168.16.123 rac3-vip.ntt.com rac3-vip

192.168.16.124 rac4-vip.ntt.com rac4-vip

#scan

192.168.16.115 rac11-scan.ntt.com rac11-scan

192.168.16.116 rac11-scan.ntt.com rac11-scan

192.168.16.117 rac11-scan.ntt.com rac11-scan

192.168.16.125 rac12-scan.ntt.com rac12-scan

192.168.16.126 rac12-scan.ntt.com rac12-scan

192.168.16.127 rac12-scan.ntt.com rac12-scan

#storge

192.168.16.188 storge.ntt.com storge

#database

192.168.16.100 hadoop.ntt.com hadoop

四、DNS配置文件

[root@oracle ~]# vi /etc/named.conf

//

// named.conf

//

// Provided by Red Hat bind package to configure the ISC BIND named(8) DNS

// server as a caching only nameserver (as a localhost DNS resolver only).

//

// See /usr/share/doc/bind*/sample/ for example named configuration files.

//

options {

listen-on port 53 { any; }; #默认监听IP是127.0.0.1,any或者注释掉就是允许所有IP

listen-on-v6 port 53 { any; }; #ip6监听地址

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 { any; }; #只允许本地主机localhost,any或者注释掉就是允许所有主机查询

recursion yes; #是否开启迭代查询功能

dnssec-enable yes;

dnssec-validation yes;

/* 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";

//file "/dev/null";

};

include "/etc/named.rfc1912.zones";

include "/etc/named.root.key";

vim /etc/named.rfc1912.zones,

// named.rfc1912.zones:

//

// Provided by Red Hat caching-nameserver package

//

// ISC BIND named zone configuration for zones recommended by

// RFC 1912 section 4.1 : localhost TLDs and address zones

// and http://www.ietf.org/internet-drafts/draft-ietf-dnsop-default-local-zones-02.txt

// (c)2007 R W Franks

//

// See /usr/share/doc/bind*/sample/ for example named configuration files.

//

//配置正向解析Zone

zone "ntt.com" IN {

type master;

file "ntt.com.zone";

allow-update { none; };

};

//注意,这个域名要和后面配置的一致

//配置反向解析Zone

zone "16.168.192.in-addr.arpa" IN {

type master;

file "16.168.192.local";

allow-update { none; };

};

vi /var/named/ntt.com.zone

$TTL 86400

@ IN SOA dns.ntt.com. root.ntt.com. (

42 ; serial (d.adams)

3H ; refresh

15M ; retry

1W ; expiry

1D) ; minimum

IN NS oracle.ntt.com.

dns IN A 192.168.16.166

rac11-scan IN A 192.168.16.115

rac11-scan IN A 192.168.16.116

rac11-scan IN A 192.168.16.117

rac12-scan IN A 192.168.16.125

rac12-scan IN A 192.168.16.126

rac12-scan IN A 192.168.16.127

rac1 IN A 192.168.16.111

rac2 IN A 192.168.16.112

rac3 IN A 192.168.16.121

rac4 IN A 192.168.16.122

rac1-vip IN A 192.168.16.113

rac2-vip IN A 192.168.16.114

rac3-vip IN A 192.168.16.123

rac4-vip IN A 192.168.16.124

storge IN A 192.168.16.188

hadoop IN A 192.168.16.100

vim /var/named/16.168.192.local

$TTL 86400

@ IN SOA dns.ntt.com. root.ntt.com. (

1997022700 ; Serial

28800 ; Refresh

14400 ; Retry

3600000 ; Expire

  1. ; Minimum

IN NS dns.ntt.com.

115 IN PTR rac11-scan.ntt.com.

116 IN PTR rac11-scan.ntt.com.

117 IN PTR rac11-scan.ntt.com.

125 IN PTR rac12-scan.ntt.com.

126 IN PTR rac12-scan.ntt.com.

127 IN PTR rac12-scan.ntt.com.

111 IN PTR rac1.ntt.com

112 IN PTR rac2.ntt.com

121 IN PTR rac3.ntt.com

122 IN PTR rac4.ntt.com

113 IN PTR rac1-vip.ntt.com

114 IN PTR rac2-vip.ntt.com

123 IN PTR rac3-vip.ntt.com

124 IN PTR rac4-vip.ntt.com

188 IN PTR storge.ntt.com

100 IN PTR hadoop.ntt.com

[root@oracle ~]# chkconfig named on

[root@oracle ~]# service named restart

vi /etc/resolv.conf

domain ntt.com

nameserver 192.168.16.166

options rotate

options timeout:2

options attempts:5

五、测试结果:

[root@dns named]# nslookup 192.168.16.111

Server: 192.168.16.166

Address: 192.168.16.166#53

111.16.168.192.in-addr.arpa name = rac1.ntt.com.16.168.192.in-addr.arpa.

[root@dns named]# nslookup 192.168.16.112

Server: 192.168.16.166

Address: 192.168.16.166#53

112.16.168.192.in-addr.arpa name = rac2.ntt.com.16.168.192.in-addr.arpa.

[root@dns named]# nslookup 192.168.16.113

Server: 192.168.16.166

Address: 192.168.16.166#53

113.16.168.192.in-addr.arpa name = rac1-vip.ntt.com.16.168.192.in-addr.arpa.

[root@dns named]# nslookup 192.168.16.114

Server: 192.168.16.166

Address: 192.168.16.166#53

114.16.168.192.in-addr.arpa name = rac2-vip.ntt.com.16.168.192.in-addr.arpa.

[root@dns named]# nslookup 192.168.16.121

Server: 192.168.16.166

Address: 192.168.16.166#53

121.16.168.192.in-addr.arpa name = rac3.ntt.com.16.168.192.in-addr.arpa.

[root@dns named]# nslookup 192.168.16.122

Server: 192.168.16.166

Address: 192.168.16.166#53

122.16.168.192.in-addr.arpa name = rac4.ntt.com.16.168.192.in-addr.arpa.

[root@dns named]# nslookup 192.168.16.123

Server: 192.168.16.166

Address: 192.168.16.166#53

123.16.168.192.in-addr.arpa name = rac3-vip.ntt.com.16.168.192.in-addr.arpa.

[root@dns named]# nslookup 192.168.16.124

Server: 192.168.16.166

Address: 192.168.16.166#53

124.16.168.192.in-addr.arpa name = rac4-vip.ntt.com.16.168.192.in-addr.arpa.

[root@dns named]# nslookup 192.168.16.115

Server: 192.168.16.166

Address: 192.168.16.166#53

115.16.168.192.in-addr.arpa name = rac11-scan.ntt.com.

[root@dns named]# nslookup 192.168.16.116

Server: 192.168.16.166

Address: 192.168.16.166#53

116.16.168.192.in-addr.arpa name = rac11-scan.ntt.com.

[root@dns named]# nslookup 192.168.16.117

Server: 192.168.16.166

Address: 192.168.16.166#53

117.16.168.192.in-addr.arpa name = rac11-scan.ntt.com.

[root@dns named]# nslookup 192.168.16.125

Server: 192.168.16.166

Address: 192.168.16.166#53

125.16.168.192.in-addr.arpa name = rac12-scan.ntt.com.

[root@dns named]# nslookup 192.168.16.126

Server: 192.168.16.166

Address: 192.168.16.166#53

126.16.168.192.in-addr.arpa name = rac12-scan.ntt.com.

[root@dns named]# nslookup 192.168.16.127

Server: 192.168.16.166

Address: 192.168.16.166#53

127.16.168.192.in-addr.arpa name = rac12-scan.ntt.com.

[root@dns named]# nslookup dns

Server: 192.168.16.166

Address: 192.168.16.166#53

Name: dns.ntt.com

Address: 192.168.16.166

[root@dns named]# nslookup dns.ntt.com

Server: 192.168.16.166

Address: 192.168.16.166#53

Name: dns.ntt.com

Address: 192.168.16.166

[root@dns named]# nslookup rac1

Server: 192.168.16.166

Address: 192.168.16.166#53

Name: rac1.ntt.com

Address: 192.168.16.111

[root@dns named]# nslookup rac2

Server: 192.168.16.166

Address: 192.168.16.166#53

Name: rac2.ntt.com

Address: 192.168.16.112

[root@dns named]# nslookup rac3

Server: 192.168.16.166

Address: 192.168.16.166#53

Name: rac3.ntt.com

Address: 192.168.16.121

[root@dns named]# nslookup rac4

Server: 192.168.16.166

Address: 192.168.16.166#53

Name: rac4.ntt.com

Address: 192.168.16.122

[root@dns named]# nslookup rac1-vip

Server: 192.168.16.166

Address: 192.168.16.166#53

Name: rac1-vip.ntt.com

Address: 192.168.16.113

[root@dns named]# nslookup rac2-vip

Server: 192.168.16.166

Address: 192.168.16.166#53

Name: rac2-vip.ntt.com

Address: 192.168.16.114

[root@dns named]# nslookup rac3-vip

Server: 192.168.16.166

Address: 192.168.16.166#53

Name: rac3-vip.ntt.com

Address: 192.168.16.123

[root@dns named]# nslookup rac4-vip

Server: 192.168.16.166

Address: 192.168.16.166#53

Name: rac4-vip.ntt.com

Address: 192.168.16.124

[root@dns named]# nslookup rac11-scan

Server: 192.168.16.166

Address: 192.168.16.166#53

Name: rac11-scan.ntt.com

Address: 192.168.16.117

Name: rac11-scan.ntt.com

Address: 192.168.16.115

Name: rac11-scan.ntt.com

Address: 192.168.16.116

[root@dns named]# nslookup rac12-scan

Server: 192.168.16.166

Address: 192.168.16.166#53

Name: rac12-scan.ntt.com

Address: 192.168.16.125

Name: rac12-scan.ntt.com

Address: 192.168.16.126

Name: rac12-scan.ntt.com

Address: 192.168.16.127

[root@dns named]# nslookup rac1.ntt.com

Server: 192.168.16.166

Address: 192.168.16.166#53

Name: rac1.ntt.com

Address: 192.168.16.111

[root@dns named]# nslookup rac1-vip.ntt.com

Server: 192.168.16.166

Address: 192.168.16.166#53

Name: rac1-vip.ntt.com

Address: 192.168.16.113

[root@dns named]# nslookup rac2.ntt.com

Server: 192.168.16.166

Address: 192.168.16.166#53

Name: rac2.ntt.com

Address: 192.168.16.112

[root@dns named]# nslookup rac2-vip.ntt.com

Server: 192.168.16.166

Address: 192.168.16.166#53

Name: rac2-vip.ntt.com

Address: 192.168.16.114

[root@dns named]# nslookup rac3.ntt.com

Server: 192.168.16.166

Address: 192.168.16.166#53

Name: rac3.ntt.com

Address: 192.168.16.121

[root@dns named]# nslookup rac3-vip.ntt.com

Server: 192.168.16.166

Address: 192.168.16.166#53

Name: rac3-vip.ntt.com

Address: 192.168.16.123

[root@dns named]# nslookup rac4.ntt.com

Server: 192.168.16.166

Address: 192.168.16.166#53

Name: rac4.ntt.com

Address: 192.168.16.122

[root@dns named]# nslookup rac4-vip.ntt.com

Server: 192.168.16.166

Address: 192.168.16.166#53

Name: rac4-vip.ntt.com

Address: 192.168.16.124

[root@dns named]# nslookup rac11-scan.ntt.com

Server: 192.168.16.166

Address: 192.168.16.166#53

Name: rac11-scan.ntt.com

Address: 192.168.16.117

Name: rac11-scan.ntt.com

Address: 192.168.16.115

Name: rac11-scan.ntt.com

Address: 192.168.16.116

[root@dns named]# nslookup rac12-scan.ntt.com

Server: 192.168.16.166

Address: 192.168.16.166#53

Name: rac12-scan.ntt.com

Address: 192.168.16.126

Name: rac12-scan.ntt.com

Address: 192.168.16.127

Name: rac12-scan.ntt.com

Address: 192.168.16.125

相关推荐
李迟10 分钟前
某Linux发行版本无法使用nodejs程序重命名文件问题的研究
java·linux·服务器
酷酷学!!!32 分钟前
Linux基础指令(汇总)
linux·运维·服务器
是桃萌萌鸭~42 分钟前
mysqldbcompare 使用及参数详解
数据库·mysql
gma99943 分钟前
brpc 与 Etcd 二次封装
数据库·c++·rpc·etcd
Yz98761 小时前
hive复杂数据类型Array & Map & Struct & 炸裂函数explode
大数据·数据库·数据仓库·hive·hadoop·数据库开发·big data
SchneeDuan1 小时前
建造者模式
运维·服务器·建造者模式
小鹿撞出了脑震荡1 小时前
SQLite3语句以及用实现FMDB数据存储的学习
数据库·学习·sqlite
小草儿7991 小时前
gbase8s之mysql的show命令实现
数据库·mysql
麻花20131 小时前
WPF里面的C1FlexGrid表格控件添加RadioButton单选
java·服务器·前端
斯普信专业组1 小时前
MongoDB调优利器:掌握性能分析工具mongostat
数据库·mongodb·mongostat