In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article introduces how to configure the DNS server in Ubuntu, the content is very detailed, interested friends can refer to, hope to be helpful to you.
DNS (Domain Name Server, domain name server) is a server that translates domain names (domain name) and corresponding IP addresses (IP address).
Environment description
Server IP 10.68.19.61
Operating system Ubuntu 13.04
DNS program Bind9
Test the domain name mycloud.com
Target IP 10.68.19.134
Install and configure BIND9
Apt-get install bind9
A total of 2 files need to be edited and 2 new files need to be added, as follows: modify / etc/bind/named.conf.options, remove the comments from forwarders, where IP is the DNS server provided by network operators, here we use google's DNS.
Forwarders {8.8.8; 8.8.4.4;}
Modify / etc/bind/named.conf.local and add two-way parsing code at the end:
Zone "mycloud.com" {type master; file "/ etc/bind/db.mycloud.com";}; zone "19.68.10.in-addr.arpa" {type master; file "/ etc/bind/db.10.68.19";}
Note: where 19.68.10 is the first three segments of the destination IP10.68.19.134, indicating an IP address field.
Add the domain name (mycloud.com) resolution file / etc/bind/db.mycloud.com, which is as follows:
; BIND data file for dev sites; $TTL 604800 @ IN SOA mycloud.com. Root.mycloud.com. (1; Serial 604800; Refresh 86400; Retry 2419200; Expire 604800); Negative Cache TTL; @ IN NS mycloud.com. @ IN A 10.68.19.134 * .mycloud.com. 14400 IN A 10.68.19.134
A new IP address reverse resolution file / etc/bind/db.10.68.19 is added as follows:
; BIND reverse data file for dev domains; $TTL 604800 @ IN SOA dev. Root.dev. (1; Serial 604800; Refresh 86400; Retry 2419200; Expire 604800); Negative Cache TTL; @ IN NS mycloud.com. 134 IN PTR mycloud.com.
Restart the BIND9 service
Service bind9 restart
Modify native configuration
Modify the dns configuration file of each DNS server that needs to be used
Sudo vi / etc/resolv.conf
Modify nameserver to the DNS server IP configured above
Nameserver 10.68.19.61
This modification will be overwritten every time the server is restarted, and the configuration file can be modified.
Sudo vi / etc/resolvconf/resolv.conf.d/base
Add an item to it
Nameserver 10.68.19.61
In this way, the DNS configuration is still valid after restarting the server, and then restart the networking service to refresh the DNS cache.
Service networking restart
Test effect
Root@controller:/etc/bind# nslookup > baidu.com Server: 10.68.19.61 Address: 10.68.19.61 Non-authoritative answer: Name: baidu.com Address: 220.181.111.86 Name: baidu.com Address: 123.125.114.144 Name: baidu.com Address: 220.181.111.85 > mycloud.com Server: 10.68.19.61 Address: 10.68. 19.61 to 53 Name: mycloud.com Address: 10.68.19.134 > uaa.mycloud.com Server: 10.68.19.61 Address: 10.68.19.61 to 53 Name: uaa.mycloud.com Address: 10.68.19.134 on how to configure the DNS server in Ubuntu, that's all. I hope the above content can be of some help to you and learn more knowledge. If you think the article is good, you can share it for more people to see.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.