本篇内容介绍了“Centos7.0中怎么部署DNS服务器”的有关知识,在实际案例的操作过程中,不少人都会遇到这样的困境,接下来就让小编带领大家学习一下如何处理这些情况吧!希望大家仔细阅读,能够学有所成!DNS(Domain Name Sys
本篇内容介绍了“Centos7.0中怎么部署DNS服务器”的有关知识,在实际案例的操作过程中,不少人都会遇到这样的困境,接下来就让小编带领大家学习一下如何处理这些情况吧!希望大家仔细阅读,能够学有所成!
DNS(Domain Name System,域名系统),因特网上作为域名和IP地址相互映射的一个分布式数据库,能够使用户更方便的访问互联网,而不用去记住能够被机器直接读取的IP数串。通过主机名,最终得到该主机名对应的IP地址的过程叫做域名解析(或主机名解析)。
[root@centos7 ~]# yum install bind-chroot bind -y
[root@centos7 ~]# cp -R /usr/share/doc/bind-*/sample/var/namedsample/ for example named configuration files.//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"; allow-query { any; }; recursion yes; dnssec-enable yes; dnssec-validation yes; dnssec-lookaside auto; bindkeys-file "/etc/named.iscdlv.key"; managed-keys-directory "/var/named/dynamic"; pid-file "/run/named/named.pid"; session-keyfile "/run/named/session.key";};logging { channel default_debug { file "data/named.run"; severity dynamic; };};zone "." IN { type hint; file "named.ca";};zone "example.local" { type master; file "example.local.zone";};zone "0.168.192.in-addr.arpa" IN { type master; file "192.168.0.zone";};include "/etc/named.rfc1912.zones";include "/etc/named.root.key";
a)创建转发域
[root@centos7 ~]# vi /var/named/chroot/var/named/example.local.zone
添加如下内容并保存:
;; Addresses and other host infORMation.;$TTL 86400@ IN SOA example.local. hostmaster.example.local. ( 2014101901 ; Serial 43200 ; Refresh 3600 ; Retry 3600000 ; Expire 2592000 ) ; Minimum; Define the nameservers and the mail servers IN NS ns1.example.local. IN NS ns2.example.local. IN A 192.168.0.70 IN MX 10 mx.example.local.centos7 IN A 192.168.0.70mx IN A 192.168.0.50ns1 IN A 192.168.0.70ns2 IN A 192.168.0.80
b)创建反向域
[root@centos7 ~]# vi /var/named/chroot/var/named/192.168.0.zone
–
;; Addresses and other host information.;$TTL 86400@ IN SOA example.local. hostmaster.example.local. ( 2014101901 ; Serial 43200 ; Refresh 3600 ; Retry 3600000 ; Expire 2592000 ) ; Minimum0.168.192.in-addr.arpa. IN NS centos7.example.local.70.0.168.192.in-addr.arpa. IN PTR mx.example.local.70.0.168.192.in-addr.arpa. IN PTR ns1.example.local.80.0.168.192.in-addr.arpa. IN PTR ns2.example.local.。
[root@centos7 ~]# /usr/libexec/setup-named-chroot.sh /var/named/chroot on[root@centos7 ~]# systemctl stop named[root@centos7 ~]# systemctl disable named[root@centos7 ~]# systemctl start named-chroot[root@centos7 ~]# systemctl enable named-chrootln -s '/usr/lib/systemd/system/named-chroot.service' '/etc/systemd/system/multi-user.target.wants/named-chroot.service'
“CentOS7.0中怎么部署DNS服务器”的内容就介绍到这里了,感谢大家的阅读。如果想了解更多行业相关的知识可以关注编程网网站,小编将为大家输出更多高质量的实用文章!
--结束END--
本文标题: CentOS7.0中怎么部署DNS服务器
本文链接: https://www.lsjlt.com/news/311974.html(转载时请注明来源链接)
有问题或投稿请发送至: 邮箱/279061341@qq.com QQ/279061341
下载Word文档到电脑,方便收藏和打印~
2024-05-13
2024-05-13
2024-05-11
2024-05-11
2024-05-10
2024-05-07
2024-04-30
2024-04-30
2024-04-30
2024-04-29
回答
回答
回答
回答
回答
回答
回答
回答
回答
回答
0