搭建rac的时候如果选择多个scan ip 则需要考虑配置dns server,多个虚拟机也可以考虑作为公用的dns服务器
安装相关packages
1 2 3 4 5 6 7 8 9 10 11 12 13
[root@xb ~]# yum install bind* -y Loaded plugins: refresh-packagekit Setting up Install Process Resolving Dependencies --> Running transaction check ---> Package bind.x86_64 32:9.8.2-0.68.rc1.el6_10.1 will be installed ---> Package bind-chroot.x86_64 32:9.8.2-0.68.rc1.el6_10.1 will be installed ---> Package bind-devel.x86_64 32:9.8.2-0.68.rc1.el6_10.1 will be installed ---> Package bind-dyndb-ldap.x86_64 0:2.3-8.el6 will be installed ---> Package bind-libs.x86_64 32:9.8.2-0.68.rc1.el6_10.1 will be installed ---> Package bind-sdb.x86_64 32:9.8.2-0.68.rc1.el6_10.1 will be installed ---> Package bind-utils.x86_64 32:9.8.2-0.68.rc1.el6_10.1 will be installed --> Finished Dependency Resolution
/* Path to ISC DLV key */ bindkeys-file "/etc/named.iscdlv.key";
managed-keys-directory "/var/named/dynamic"; };
...省略 zone "oracle.com" IN { type master; file "oracle.com.zone"; allow-transfer {192.0.2.1;}; }; zone "2.0.192.in-addr.arpa" IN { type master; file "2.0.192.in-addr.arpa.zone"; };
$TTL 86400 @ SOA oracle.com. root ( 42 ; serial (d. adams) 3H ; refresh 15M ; retry 1W ; expiry 1D ) ; minimum @ NS dns.oracle.com. dns A 192.0.2.20 rac1 A 192.0.2.11 rac2 A 192.0.2.12 rac-scan A 192.0.2.15 rac-scan A 192.0.2.16 rac-scan A 192.0.2.17 rac1-vip A 192.0.2.13 rac2-vip A 192.0.2.14
配置2.0.192.in-addr.arpa.zone
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
$TTL 86400 @ IN SOA oracle.com. root.dns.oracle.com. ( 1997022700 ; Serial 28800 ; Refresh 14400 ; Retry 3600000 ; Expire 86400 ) ; Minimum IN NS dns.oracle.com. 11 IN PTR rac1.oracle.com. 12 IN PTR rac2.oracle.com. 13 IN PTR rac1-vip.oracle.com. 14 IN PTR rac2-vip.oracle.com. 15 IN PTR rac-scan. 16 IN PTR rac-scan. 17 IN PTR rac-scan.
修改/etc/resolv.conf
1 2 3
# Generated by NetworkManager search oracle.com nameserver 192.0.2.20
验证
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
[root@xb etc]# ping rac1.oracle.com PING rac1.oracle.com (192.0.2.11) 56(84) bytes of data. 64 bytes from rac1.oracle.com (192.0.2.11): icmp_seq=1 ttl=64 time=1.19 ms 64 bytes from rac1.oracle.com (192.0.2.11): icmp_seq=2 ttl=64 time=0.390 ms 64 bytes from rac1.oracle.com (192.0.2.11): icmp_seq=3 ttl=64 time=0.468 ms ^C --- rac1.oracle.com ping statistics --- 3 packets transmitted, 3 received, 0% packet loss, time 2594ms rtt min/avg/max/mdev = 0.390/0.683/1.192/0.361 ms [root@xb etc]# nslookup rac-scan Server: 192.0.2.20 Address: 192.0.2.20#53