内网环境Linux发行版本均采用centos为主,centos下DNS服务端的搭建步骤如下:
- DNS master节点搭建步骤:
- 安装组件: yum install bind; yum install bind-chroot
- 将named_master.tgz解压,覆盖到/var/named/chroot/etc
- 启动 service named start
- DNS slave节点搭建步骤:
- 安装组件: yum install bind; yum install bind-chroot
- 将named_slave.tgz解压,覆盖到/var/named/chroot/etc
- 新建slaves目录,确保named组用户可写:mkdir /var/named/chroot/etc/slaves && chown 775 /var/named/chroot/etc/slaves
- 启动 service named start(会自动从master同步文件)
- DNS域名切换步骤
- 登录到master节点,/var/named/chroot/etc/stgwebank.zone中的serial值(修改为原有的数值+1)
- 在master节点执行service named reload
- 客户端验证
- 客户端需要配置/etc/resolv.conf,nameserver 指向master节点与slave节点
- 执行nslookup ipd1.mgmt.ntp-core.stgwebank,检查域名是否已经解析为调整后的IP