Linux Install Bind

Source: Internet
Author: User
Tags install openssl openssl openssl library

https://www.isc.org/downloads/

2. Unzip the tar zxvf bind-9.9.7rc1.tar.gz

CD BIND-9.9.7RC1

3. Compile and install

./configure--prefix=/usr/local/named--enable-threads #--enable-threads

Hint No OpenSSL

Checking for OpenSSL Library ... Configure:error:OpenSSL is not found in any of/usr/usr/local/usr/local/ssl/usr/pkg /USR/SFW; Use--with-openssl=/path

--------------------------------------------------------------------------------------------------

Hint No OpenSSL

Solution:

Yum Install OpenSSL

Yum Install Openssl-devel

"Ubuntu System solution apt-get install OpenSSL apt-get install Libssl-dev"

"sudo./rndc-confgen > rndc.conf reaction for a long time"

----------------------------

Solution:

Http://www.nginxs.com/linux/43.html

"/home/wkubuntu/named/sbin/named-c/home/wkubuntu/named/etc/named.conf & Press two times, no show done"

---------------------------

Cd/home/wkubuntu/named/etc

VI named.conf Modify this file: Remove the above copyright

--------------------------------------------------------------------------------------------------------------- --------------------------------

February 4, 2015

1, sudo wget ftp://ftp.isc.org/isc/bind9/9.10.1/bind-9.10.1.tar.gz

2, TAR-ZXVF bind-9.10.1.tar.gz

3. Create a Directory

Create named directory and Namedfile directory under/home/wkubuntu

4. Compile and install

CD bind-9.10.1

./configure--prefix=/home/wkubuntu/named/--with-dlz-mysql=/usr/local/mysql

Make

Make install

At this point into the/home/wkubuntu/named directory, the inside automatically generated bin etc include Lib Sbin share var these files directory

5. Configure bind

Cd/home/wkubuntu/named/etc

Touch named.conf

VI named.conf Posted 1

Copy the 5 files under the/home/wkubuntu/named/var directory

Generate the key for RNDC

A) cd/home/wkubuntu/named/sbin/

b) Vim random input a long letter. Is that there is no random generator on the server, in which case we will manually forge a file instead of the/dev/random function.

c) rndc-confgen-r random >/etc/rndc.key

D) Cat/etc/rndc.key

e) Copy

Secret "pfnoq0fensbbgbyn/ndrsw=="; This line

The line that covers the named.conf of the/HOME/WKUBUNTU/NAMED/ETC

6. Start Bind, print process

Enter two times sudo/home/wkubuntu/named/sbin/named-c/home/wkubuntu/named/etc/named.conf &

When done, it means success.

"If there's an exit, something went wrong, look at the print process sudo/home/wkubuntu/named/sbin/named-gc/home/wkubuntu/named/etc/named.conf &

Killall named can shut off all named, if used-GC. "

To create a log directory, such as the following configuration mkdir logs

/home/wkubuntu/named/logs

Other:

Content 1:

Logging{channel error_log {file "/home/wkubuntu/named/logs/normal.log" versions 3 size 2m;    Severity error;    Print-time Yes;    Print-severity Yes; Print-category yes;}; Category default{error_log;};    Channel update_log{file "/home/wkubuntu/named/logs/update.log" versions 3 size 1m;    Severity info;    Print-time Yes;    Print-severity Yes; Print-category yes;}; Category update{Update_log;};    Channel notify_log{file "/home/wkubuntu/named/logs/notify.log" versions 3 size 1m;    Severity info;    Print-time Yes;    Print-severity Yes; Print-category yes;}; Category notify{Notify_log;};};o           ptions {directory "/home/wkubuntu/named/var/";        Pid-file "/home/wkubuntu/named/var/run/named/named.pid";        Dump-file "/home/wkubuntu/named/logs/named_dump.db";        Statistics-file "/home/wkubuntu/named/logs/named.stats";        Version "Welcome to Niot platform!";        listen-on-v6 {any;};        allow-query {any;}; Allow-query-cache { Any        };        allow-recursion {localnets; localhost;}; Notify No;};     Key "Rndc-key" {algorithm hmac-md5; Secret "fldvvlvxfjmjpdiy+7nesw==";}; Controls {inet 127.0.0.1 port 953 allow {127.0.0.1;} keys {"Rndc-key";};}; Zone "."    in {type hint; File "/home/wkubuntu/named/var/named.root";};    Zone "localhost" in {type Master;    File "/home/wkubuntu/named/var/localhost.zone"; allow-update {none;};};    Zone "0.0.127.in-addr.arpa" in {type Master;    File "/home/wkubuntu/named/var/localhost.reverse"; allow-update {none;};}; Dlz "MySQL zone" {database "MySQL {host=127.0.0.1 dbname=db_epp ssl=false port=3306 user=root pass=root} {SE Lect zone from dns_records where zone = ' $zone $ ' limit 1} {Select TTL, type, mx_priority, case when lower ( Type) = ' txt ' then concat (' \ ' ', data, ' \ ') when lower (type) = ' SOA ' then Concat_ws (', Data, Resp_person, serial , refresh, retry, expire, minimum) when lower (type) = ' naPTR ' then concat ', Naptr_order, ', naptr_preference, ' \ ', naptr_flags, ' \ ' ', ' \ ' ', Naptr_service, ' \ ', ' \ ', nap         Tr_regexp, ' \ ' ', data, '. ') Else data end from dns_records where zone = ' $zone $ ' and host = ' $record $ '} ';};

7. Testing

Dig @localhost 6920000000012.running.niot.cn Naptr

The database must have this record, such as the test can be

Linux Install Bind

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.