CentOS7 Installing the Configuration DNS server

Source: Internet
Author: User
Tags dnssec

Prepare for work (assuming name is bigcloud.local)

1234567891011121314151617 #更改主机名称#vi /etc/sysconfig/network# Created by anacondaNETWORKING=yesHOSTNAME=bigcloud.local#修改文件/etc/hosts,内容如下:127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4::1         localhost localhost.localdomain localhost6 localhost6.localdomain6192.168.188.135  bigcloud bigcloud.localdomain#修改DNS配置# vi /etc/resolv.conf添加如下DNS1=192.168.188.11DNS2=192.168.188.12DOMAIN=bigcloud.local安装bindrpm -Uvh bind-9.9.4-14.el7.x86_64.rpm

Start Configuration Server

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465 66676869707172737475767778798081 #启动服务 # service named startRedirecting to /bin/systemctlstart  named.service#修改配置文件。 #在修改之前,先进行备份,这是一个好习惯 # cp /etc/named.conf  /etc/named.conf.bak# vi /etc/named.conf  #建议:先将原有配置注释,再写新的配置,如下所示 options {         //listen-on port 53 { 127.0.0.1; };         listen-on port 53 { any; };  #将 dnssec 设置"yes"修改为 no,示例如下:         //dnssec-enableyes        dnssec-enable no;         //dnssec-validationyes        dnssec-validation no;         dnssec-lookaside auto;  #将 allow-query 设置修改为 any,示例如下:         //allow-query{ localhost; };         allow-query     { any; }; allow-transfer { 192.168.188.11; 192.168.188.12; };#设置辅助DNS的地址forwarders {202.102.224.68; 202.102.227.68; }; # 配置DNS转发器};    //LEAUS Add  添加正向ZONEzone "bigcloud.local"IN {        typemaster;        file"bigcloud.zone";};//添加反向ZONEzone "0.0.10.in-addr.arpa"IN { #此处IP地址根据自己所设置的网段不同而更改        typemaster;         file"10.0.0.zone"}; #创建ZONE文件#cd /var/named/#vi bigcloud.zone$TTL 3H@       IN SOA  zzsrv1.bigcloud.local. rname.invalid. (                                        0       ; serial                                        1D      ; refresh                                        1H      ; retry                                        1W      ; expire                                        3H )    ; minimum        NS       zzsrv1.bigcloud.local.zzsrv1  A        192.168.188.11zzsrv2  A        192.168.188.12ftpA        192.168.188.11mailsrv1   A     192.168.188.22www    A         192.168.188.11crm    A         192.168.188.11smtp    CNAME   mailsrv1.bigcloud.local.pop3    CNAME   mailsrv1.bigcloud.local.#根据自身情况修改以上地址反向ZONE文件# vi192.168.188.zone$TTL 3H@       INSOA  zzsrv1.bigcloud.local.  tom_chen.126.com (                                        0       ; serial                                        1D      ; refresh                                        1H      ; retry                                        1W      ; expire                                        3H)    ; minimum         IN NS zzsrv1.bigcloud.local.         IN NS zzsrv2.bigcloud.local.11       IN PTR zzsrv1.bigcloud.local.11       IN PTR ftp.bigcloud.local.12       IN PTR zzsrv2.bigcloud.local.12       IN    PTR mailsrv1.bigcloud.local.#启动服务#systemctlstart  named.service#第一次启动速度会比较慢设置为自动启动# systemctlenable named

Test

123456789101112131415161718192021222324 # nslookup> server192.168.188.11Default server: 192.168.188.11Address: 192.168.188.11#53>www.bigcloud.local.Server:        192.168.188.11Address:       192.168.188.11#53 Name:  www.bigcloud.localAddress: 192.168.188.11>smtp.bigcloud.local.Server:        192.168.188.11Address:       192.168.188.11#53 smtp.bigcloud.localcanonical name = mailsrv1.bigcloud.local.Name:  mailsrv1.bigcloud.localAddress: 192.168.188.22>192.168.188.11Server:        192.168.188.11Address:       192.168.188.11#53 11.188.168.192.in-addr.arpa     name = ftp.bigcloud.local.11.188.168.192.in-addr.arpa     name = zzsrv1.bigcloud.local.exit

This article is from the "Li Hao" blog, make sure to keep this source http://leaus.blog.51cto.com/9273485/1540310

CentOS7 Installing the Configuration DNS server

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.