cd / usr / local / src
wget ftp://ftp.bind.com/pub/bind9/9.5.0/bind-9.5.0.tar.gz
tar zxvf bind-9.5.0.tar . gz
cd bind-9.5.0
. / configure with-dlz-mysql enable-threads prefix = / usr / local / bind
make
make install
cd / usr / local / bind / etc /
.. / sbin / rndc-confgen> rndc.conf
tail-n10 rndc.conf | head-n9 | sed-es / # / / g> named . conf
vi localhost.zone
ttl 86400
@ IN SOA localhost. root.localhost. (
1997022700; Serial
28800; Refresh
14400; Retry
3600000; Expire
86400); Minimum
IN NS localhost.
1 IN PTR localhost.
dig> named.root
vi named.conf
add the final
dlz 'limit 1}
{select ttl, type, mx_priority, case when lower (type) =' txt 'then concat (' concat_ws ('', data, resp_person, serial,
nike zoom, refresh, retry,
jimmy choo pep, expire, minimum) else data end as mydata from dns_records where zone = '% zone%' and host = '% record%'}
{}
{select ttl,
不开心就来看看, type, host, mx_priority, case when lower (type) = 'txt' then concat (' expire, minimum from dns_records where zone = '% zone%'}
{select zone from xfr_table where zone = '% zone%' and client = '% client%' limit 1}
{update data_count set count = count + 1 where zone = '% zone %'}DATABASE dns;
build a table dns_records
use dns;
CREATE TABLE dns_records (
zone varchar (255),
host varchar (255),
type varchar (255),
data varchar (255),
ttl int (11),
air max 95 shoes This article can not stand too funny ~ ~ ~,
mx_priority varchar (255),
refresh int (11),
retry int (11),
expire int (11),
minimum int (11),
serial bigint (20),
discount louis vuitton wallet,
resp_person varchar (255),
primary_ns varchar (255)
);
to add a record
INSERT INTO `dns_records` (`zone`, `host`, `type`, `data`, `ttl`, `mx_priority`
, `refresh`, `retry`,
深圳-阳朔路线, `expire`, `minimum `,` serial `,
nike air max 90 brown,` resp_person `,` primary_ns `) VALUES ('yemaosheng.com', '*', 'A', '192 .168.0.1 ', '800', NULL, NULL, '10 ', NULL,
NULL,
buy christian louboutin uk, NULL, NULL, NULL);
cp / usr/local/mysql/lib/mysql/libmysqlclient.so.15 / usr / lib /
start Bind
. / named-u root-g-d 1