DNS Series-2.dns Service Build (BIND compilation installation)
Catalogue
First, install bind
1. Yum Installation
2. Compile and install
Second, service construction
1. Edit the DNS master configuration file
2. Add parsing
Third, testing
1. Forward Analysis test
2, Reverse analysis test
First, install bind
Bind (Kerkeley Internet Name deamon) is the most widely used DNS server software for today's Internet, and the DNS server that uses bind as the server software consumes approximately 90% of all DNS servers. Bind is now developed and maintained by the Internet Systems Association (INTETNET Systems Consortium).
1. Yum installation
Yum Install Bind–y
2. Compile and install
1)yum groupinstall Development Tools Installation Development Kit
2)TAR–XVF bind-9.9.5.tar.gz
3)useradd-r-d/var/named-s/sbin/nologin named
Mkdir/var/named
Chgrp named/var/named/
chmod 770/var/named/
4)./configure--prxfix=/usr/local/named--sysconfdir=/etc/named--without-openssl
5) Make
6) make install #编译安装完成
7) Setting Environment variables
vim/etc/profile.d/named.sh
Export Path=/usr/local/named/bin:/usr/local/named/sbin: $PATH
8) library files and header files
Vim/etc.ld.so.conf.d/named.conf
/usr/local/named/lib
Ldconfig–p
Ln–s/usr/lcoa/named/inclue/usr/inclue/named
9) Man Help
vim/etc/man_db.conf (Centos6 file is/etc/man.conf)
Manpath/usr/local/named/share/man
#完成
Note: The configuration file does not exist after all the compilation process is completed and needs to be created manually. (The following example is not done on the current server, to save time on another installed server to do the experiment)
Second, service construction
1. Edit the DNS master configuration file
Vim/ect/named.conf
650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M01/8B/94/wKiom1hRZmKRkoykAAD80qlNXhs138.jpg "title=" Qq20161208173704.jpg "width=" "height=" 248 "border=" 0 "hspace=" 0 "vspace=" 0 "style=" WIDTH:700PX;HEIGHT:248PX; "alt = "Wkiom1hrzmkrkoykaad80qlnxhs138.jpg"/>
Vim Etc/named.rfc1912.zones
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/8B/94/wKiom1hRZp-jdiORAACMo1zrMMk138.jpg "title=" Qq20161208173729.jpg "width=" "height=" 238 "border=" 0 "hspace=" 0 "vspace=" 0 "style=" WIDTH:700PX;HEIGHT:238PX; "alt = "Wkiom1hrzp-jdioraacmo1zrmmk138.jpg"/>
Medium zone configuration can also be written in/etc/named.conf
2. Add parsing
Vim/var/named/mage.com.zone (the file name is in the profile file content) forward parsing
650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M01/8B/90/wKioL1hRZnuiRcWeAACkbB1wC8s645.jpg "title=" Qq20161208174309.jpg "width=" "height=" 147 "border=" 0 "hspace=" 0 "vspace=" 0 "style=" WIDTH:700PX;HEIGHT:147PX; "alt = "Wkiol1hrznuircweaackbb1wc8s645.jpg"/>
Vim/var/named/172.16.zone (Reverse parsing)
650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M01/8B/90/wKioL1hRZxbjzBiaAABIG24SlDI384.jpg "title=" Qq20161208174617.jpg "width=" "height=" border= "0" hspace= "0" vspace= "0" style= "width:700px;height:220px;" alt = "Wkiol1hrzxbjzbiaaabig24sldi384.jpg"/>
Third, testing
1. Forward Analysis test
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/8B/94/wKiom1hRZy6jiCumAADPAGXNVsU756.jpg "title=" Qq20161208175022.jpg "width=" "height=" 429 "border=" 0 "hspace=" 0 "vspace=" 0 "style=" WIDTH:700PX;HEIGHT:429PX; "alt = "Wkiom1hrzy6jicumaadpagxnvsu756.jpg"/>
2, Reverse analysis test
650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M02/8B/90/wKioL1hRZ1LABd2DAADRUE8yiuo953.jpg "title=" Qq20161208175154.jpg "width=" "height=" 486 "border=" 0 "hspace=" 0 "vspace=" 0 "style=" WIDTH:700PX;HEIGHT:486PX; "alt = "Wkiol1hrz1labd2daadrue8yiuo953.jpg"/>
Note: Please remember to set DNS to local IP address before testing
vim/etc/resolv.conf nameserver 172.16.250.90
Or permanently modify the NIC configuration that adds dns=172.16.250.90.
Some of the configuration file content explained in the DNS series-1, the basic concept of DNS is described.
This article is from the "Fall" blog, please be sure to keep this source http://lxlxlx.blog.51cto.com/3363989/1882871
DNS Series-2.dns Service Build (BIND compilation installation)