|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
如果您觉得本篇CentOSLinux教程讲得好,请记得点击右边漂浮的分享程序,把好文章分享给你的好朋友们!筹办事情(假定称号为bigcloud.local)
#变动主机称号
#vi/etc/sysconfig/network
#Createdbyanaconda
NETWORKING=yes
HOSTNAME=bigcloud.local
#修正文件/etc/hosts,内容以下:
127.0.0.1localhostlocalhost.localdomainlocalhost4localhost4.localdomain4
::1localhostlocalhost.localdomainlocalhost6localhost6.localdomain6
192.168.188.135bigcloudbigcloud.localdomain
#修正DNS设置
#vi/etc/resolv.conf
增加以下
DNS1=192.168.188.11
DNS2=192.168.188.12
DOMAIN=bigcloud.local
装置bind
rpm-Uvhbind-9.9.4-14.el7.x86_64.rpm
入手下手设置办事器
#启动办事
#servicenamedstart
Redirectingto/bin/systemctlstartnamed.service
#修正设置文件。
#在修正之前,先辈行备份,这是一个好习气
#cp/etc/named.conf/etc/named.conf.bak
#vi/etc/named.conf
#倡议:先将原有设置正文,再写新的设置,以下所示
options{
//listen-onport53{127.0.0.1;};
listen-onport53{any;};
#将dnssec设置"yes"修正为no,示比方下:
//dnssec-enableyes;
dnssec-enableno;
//dnssec-validationyes;
dnssec-validationno;
dnssec-lookasideauto;
#将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转发器
};
//LEAUSAdd增加正向ZONE
zone"bigcloud.local"IN{
typemaster;
file"bigcloud.zone";
};
//增加反向ZONE
zone"0.0.10.in-addr.arpa"IN{
#此处IP地点依据本人所设置的网段分歧而变动
typemaster;
file"10.0.0.zone";
};
#创立ZONE文件
#cd/var/named/
#vibigcloud.zone
$TTL3H
@INSOAzzsrv1.bigcloud.local.rname.invalid.(
0;serial
1D;refresh
1H;retry
1W;expire
3H);minimum
NSzzsrv1.bigcloud.local.
zzsrv1A192.168.188.11
zzsrv2A192.168.188.12
ftpA192.168.188.11
mailsrv1A192.168.188.22
wwwA192.168.188.11
crmA192.168.188.11
smtpCNAMEmailsrv1.bigcloud.local.
pop3CNAMEmailsrv1.bigcloud.local.
#依据本身情形修正以上地点
反向ZONE文件
#vi192.168.188.zone
$TTL3H
@INSOAzzsrv1.bigcloud.local.tom_chen.126.com(
0;serial
1D;refresh
1H;retry
1W;expire
3H);minimum
INNSzzsrv1.bigcloud.local.
INNSzzsrv2.bigcloud.local.
11INPTRzzsrv1.bigcloud.local.
11INPTRftp.bigcloud.local.
12INPTRzzsrv2.bigcloud.local.
12INPTRmailsrv1.bigcloud.local.
#启动办事
#systemctlstartnamed.service
#第一次启动速率会对照慢
设置为主动启动
#systemctlenablenamed
测试
#nslookup
>server192.168.188.11
Defaultserver:192.168.188.11
Address:192.168.188.11#53
>www.ckuyun.com.
Server:192.168.188.11
Address:192.168.188.11#53
Name:www.ckuyun.com
Address:192.168.188.11
>smtp.bigcloud.local.
Server:192.168.188.11
Address:192.168.188.11#53
smtp.bigcloud.localcanonicalname=mailsrv1.bigcloud.local.
Name:mailsrv1.bigcloud.local
Address:192.168.188.22
>192.168.188.11
Server:192.168.188.11
Address:192.168.188.11#53
11.188.168.192.in-addr.arpaname=ftp.bigcloud.local.
11.188.168.192.in-addr.arpaname=zzsrv1.bigcloud.local.
>exit
如果您觉得本篇CentOSLinux教程讲得好,请记得点击右边漂浮的分享程序,把好文章分享给你的小伙伴们! |
|