In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
Editor to share with you CentOS 6.5 how to make Docker DNS service image, I hope you can get something after reading this article, let's discuss it together!
The first step is to configure Hosts and obtain docker image:
Echo "192.168.56.101 registry.feedao.com" > > / etc/hosts
The second step is to pay attention to the udp protocol. 256m is the memory size:
Docker run-d-p 127.0.0.1 registry.feedao.com/centos-newssh 33306 docker run-p 53:53-p 53:53/udp 256m registry.feedao.com/centos-newssh
Step 3: log into the container
Ssh 127.0.0.1-p 33306
Step 4: install bind9
Yum install bind bind-utils-y
Step 5: modify the configuration file / etc/named.conf,options see below:
Options {forwarders {8.8.8; 8.8.4.4;}; 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; / * Path to ISC DLV key * / bindkeys-file "/ etc/named.iscdlv.key"; managed-keys-directory "/ var/named/dynamic";}
In / etc/named.conf, suppose our domain name is added to the feedao.com file
Zone "feedao.com" {type master; file "db.feedao.com";}
Step 6: enter / var/named/, to add db.feedao.com, as follows:
$TTL 604800 @ IN SOA feedao.com. Www.feedao.com. (3; Serial 604800; Refresh 86400; Retry 2419200; Expire 604800); Negative Cache TTL @ IN NS feedao.com.@ IN A 192.168.56.101registry IN A 192.168.56.101 * IN A 192.168.56.101
Step 7: start the named service:
Service named start
Step 8: since the exit container where dns resides cannot be modified, modify / etc/resolv.conf:
Mv / etc/resolv.conf / etc/resolv.conf.bakecho "nameserver 192.168.56.103" > / etc/resolv.conf
Step 9: test and install bind-utils
Yum-y install bind-utils
Test:
Dig @ 192.168.56.103. Feedao.com
If there's a reaction, it's a success.
Step 10: remove the 192.168.56.101 registry.feedao.com test from / etc/hosts:
Curl registry.feedao.com
It will have the same effect as configuring Hosts. Later, just configure the dns of the new machine to 192.168.56.103.
After reading this article, I believe you have a certain understanding of "how to make a Docker DNS service image with CentOS 6.5". If you want to know more about it, please follow the industry information channel. Thank you for your reading!
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.