搭建RAC時配置scanip的DNS環境
在搭建RAC時,scanip需要dns解析,下面演示如何配置dns
伺服器環境:rhel-server-7.3-x86_64
域名解析:ol7-122-scan.fly.cn
3個scanip: 192.168.56.105
192.168.56.106
192.168.56.107
1、安裝bind包
[root@ol7-122-rac1 ~]# yum list|grep bind-chroot
bind-chroot.x86_64 32:9.9.4-37.el7 rhel-media
[root@ol7-122-rac1 ~]# yum -y install bind-chroot.x86_64
修改/etc/named.conf 檔案如下:
[root@ol7-122-rac1 named]# more /etc/named.conf
//
// named.caching-nameserver.conf
//
// Provided by Red Hat caching-nameserverpackage to configure the
// ISC BIND named(8) DNS server as acaching only nameserver
// (as a localhost DNS resolver only).
//
// See /usr/share/doc/bind*/sample/ forexample named configuration files.
//
// DO NOT EDIT THIS FILE - usesystem-config-bind or an editor
// to create named.conf - edits to thisfile will be lost on
// caching-nameserver package upgrade.
//
options {
listen-on port 53 { any; };
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";
// Those options should be used carefully because they disable port
// randomization
// query-source port 53;
// query-source-v6 port 53;
allow-query { any; };
allow-query-cache { any; };
};
logging {
channel default_debug {
file"data/named.run";
severity dynamic;
};
};
view localhost_resolver {
match-clients { any; };
match-destinations { any; };
recursion yes;
include"/etc/named.rfc1912.zones";
};
2、修改/etc/named.rfc1912.zones檔案
增加以下的正向解析和反向解析資訊
[root@ol7-122-rac1 named]# vi /etc/named.rfc1912.zones
zone "fly.cn" IN {
type master;
file "fly.cn.zone";
allow-update { none; };
};
zone "56.168.192.in-addr.arpa" IN{
type master;
file "56.168.192.local";
allow-update { none; };
};
3、新增正向解析檔案
(如配置不當會報錯 zonefly.cn/IN: NS 'dns.fly.cn' has no address records (A or AAAA),參考附1; 此處演示正常檔案):
[root@ol7-122-rac1 named]# vi /var/named/fly.cn.zone
$TTL 86400
@ IN SOA dns.fly.cn. root.fly.cn. (
42 ; serial (d. adams)
3H ; refresh
15M ; retry
1W ; expiry
1D) ; minimum
IN NS dns.fly.cn.
ol7-122-scan IN A 192.168.56.105
ol7-122-scan IN A 192.168.56.106
ol7-122-scan IN A 192.168.56.107
dns.fly.cn. IN A 192.168.56.101
dns.fly.cn. IN A 192.168.56.102
4、新增反向解析檔案:
[root@ol7-122-rac1 named]# vi /var/named/56.168.192.local
$TTL 86400
@ IN SOA dns.fly.cn. root.fly.cn. (
1997022700 ; Serial
28800 ; Refresh
14400 ; Retry
3600000 ; Expire
86400) ; Minimum
IN NS dns.fly.cn.
105 IN PTR ol7-122-scan.fly.cn.
106 IN PTR ol7-122-scan.fly.cn.
107 IN PTR ol7-122-scan.fly.cn.
5、配置/etc/resolv.conf檔案,
解析dns
[root@ol7-122-rac1 named]# vi /etc/resolv.conf
# Generated by NetworkManager
search localdomain
nameserver 192.168.56.101
重啟dns
[root@ol7-122-rac1 named]# systemctl restart named
6、檢測dns是否好用
[root@ol7-122-rac1 named]# 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.105
Name: ol7-122-scan.fly.cn
Address: 192.168.56.106
Name: ol7-122-scan.fly.cn
Address: 192.168.56.107
附1:zone fly.cn/IN: NS 'dns.fly.cn' has no address records (A or AAAA) 問題
問題:
初始配置正向解析檔案時如下:
[root@ol7-122-rac1 named]# vi/var/named/fly.cn.zone
$TTL 86400
@ IN SOA dns.fly.cn. root.fly.cn. (
42 ; serial (d. adams)
3H ; refresh
15M ; retry
1W ; expiry
1D) ; minimum
IN NS dns.fly.cn.
ol7-122-scan IN A 192.168.56.105
ol7-122-scan IN A 192.168.56.106
ol7-122-scan IN A 192.168.56.107
重啟dns時報錯
[root@ol7-122-rac1 named]# systemctlrestart named
Starting named:
Error in named configuration:
zone localhost.localdomain/IN: loadedserial 0
zone localhost/IN: loaded serial 0
zone1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa/IN:loaded serial 0
zone 1.0.0.127.in-addr.arpa/IN: loadedserial 0
zone 0.in-addr.arpa/IN: loaded serial 0
zone fly.cn/IN: NS 'dns.fly.cn' has noaddress records (A or AAAA)
zone fly.cn/IN: not loaded due to errors.
localhost_resolver/fly.cn/IN: bad zone
zone 56.168.192.in-addr.arpa/IN: loadedserial 1997022700
[FAILED]
解決方案:
在正向解析檔案新增如下資訊:
[root@ol7-122-rac1 named]# vi/var/named/fly.cn.zone
dns.fly.cn. IN A 192.168.56.101
dns.fly.cn. IN A 192.168.56.102
再次重啟dns時無問題
[root@ol7-122-rac1 named]# systemctlrestart named
相關文章
- 更改rac scanIP IP的地址
- Java環境搭建與配置、以及Tomcat搭建與配置JavaTomcat
- Spring(環境搭建&配置詳解)Spring
- RAC環境修改spfile的位置
- ORACLE 12C RAC 生產環境搭建介紹Oracle
- spring cloud 信用盤程式搭建環境配置SpringCloud
- Python 開發環境搭建(04):pydev 配置Python開發環境dev
- Windows環境下的Nginx環境搭建WindowsNginx
- app自動化測試環境配置:adb環境配置、monkey環境配置、appium環境配置大全APP
- vue的環境搭建Vue
- Laravel 環境的搭建Laravel
- Oracle RAC 環境下的連線管理Oracle
- 環境搭建
- (一)Linux環境的學習環境的搭建Linux
- DM8 配置DMDSC主備環境(rac到單節點 )
- 快速搭建 Linux(LNMP + Linux 安裝 + 環境配置)LinuxLNMP
- SpringMVC基本環境搭建(配置檔案模板模板)SpringMVC
- Linux下環境搭建(二)——jenkins+gitlab配置LinuxJenkinsGitlab
- CentOS SVN 環境搭建配置跟自動部署CentOS
- KingbaseES RAC部署案例之---SAN環境構建RAC
- 環境配置
- 搭建eureka叢集環境以及客戶端配置客戶端
- Elasticsearch叢集搭建教程及生產環境配置Elasticsearch
- Flutter搭建開發環境和工具安裝配置Flutter開發環境
- 手工清理19c RAC環境
- RAC環境下建立物理DATAGUARD(1)
- RAC環境下建立物理DATAGUARD(2)
- RAC和ASM環境下打patchASM
- 京東雲環境搭建oracle rac詳細部署梳理(可信的結果輸出)Oracle
- 《生產環境下Hadoop大叢集安裝與配置+DNS+NFS》HadoopDNSNFS
- DM8 實時主備環境搭建
- 歷時三天,成功搭建Laravel Sail環境LaravelAI
- gogs環境搭建Go
- App環境搭建APP
- mac搭建環境Mac
- Kubernetes環境搭建
- swoft 環境搭建
- Flutter環境搭建Flutter
- 搭建Java環境Java