Chinaunix首页 | 论坛 | 博客
  • 博客访问: 7347263
  • 博文数量: 1763
  • 博客积分: 18684
  • 博客等级: 上将
  • 技术积分: 16217
  • 用 户 组: 普通用户
  • 注册时间: 2010-06-02 10:28
个人简介

啥也没写

文章分类

全部博文(1763)

文章存档

2023年(44)

2022年(39)

2021年(46)

2020年(43)

2019年(27)

2018年(44)

2017年(50)

2016年(47)

2015年(15)

2014年(21)

2013年(43)

2012年(143)

2011年(228)

2010年(263)

2009年(384)

2008年(246)

2007年(30)

2006年(38)

2005年(2)

2004年(1)

分类: LINUX

2010-11-25 12:44:15

详细请查看
 
这个是从原来的Easy-CDN管理系统中分离出来的,是专门管理内部DNS的!
 
bind-dlz安装
wget
tar -zxvf bind-9.6.0-P1.tar.gz
cd bind-9.6.0-P1
./configure --with-dlz-mysql --enable-largefile --enable-threads=no --prefix=/usr/local/bind
make -j4
make install
cd ..
cd /usr/local/bind/etc
dig > named.root
../sbin/rndc-confgen >rndc.conf
tail -n10 rndc.conf | head -n9 | sed -e s/#\//g >named.conf
 
再编译named.conf
options {
 version "Bind 10.0.01";
 recursion       no;
        allow-query    { any; };
        allow-transfer { none; };
 directory "/usr/local/bind/etc";
 pid-file "named.pid";
};
logging {
 channel query_log {
 file "/usr/local/bind/var/query.log" versions 10  size 10M;
 severity        info;
                      print-time        yes;
                      print-category  yes;
              };
              category queries {
                      query_log;
              };
      };
dlz "Mysql zone" {
   database "mysql
   {host=127.0.0.1 dbname=dns ssl=false port=3306 user=root pass=root }
   {select 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) 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('\"', data, '\"') else data end as mydata, resp_person, serial, refresh, retry, 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%'}";
};
 
再下载管理工具
wget
 
把dns.sql导入数据库就可能管理了!
 
阅读(2129) | 评论(0) | 转发(0) |
0

上一篇:iscanner

下一篇:DotNET程序运行框架

给主人留下些什么吧!~~