- 论坛徽章:
- 0
|
mysql是按以下方法编译的
./configure –prefix=/usr/local/mysql –with-unix-socket-path=/tmp/mysql.sock –with-big-tables –enable-thread-safe-client –localstatedir=/home/mysql/data –with-named-curses-libs=/usr/lib/libncursesw.so.5
bind是用以下方法编辑的
./configure --prefix=/usr/local/named --enable-threads=no --enable-largefile --with-dlz-mysql
动态域配置
dlz "vale.com.cn" {
database "mysql
{host=localhost dbname=bind user=bind pass=vale.com-init}
{SELECT zone FROM records WHERE zone = '%zone%'}
{SELECT ttl, type, mx_priority, IF(type = 'TXT', CONCAT('\"',data,'\"'), data) AS data FROM records
WHERE zone = '%zone%' AND host = '%record%' AND type <> 'SOA' AND type <> 'NS'}
{SELECT ttl, type, data, primary_ns, resp_contact, serial, refresh, retry, expire, minimum FROM records
WHERE zone = '%zone%' AND (type = 'SOA' OR type='NS')}
{SELECT ttl, type, host, mx_priority, IF(type = 'TXT', CONCAT('\"',data,'\"'), data) AS data, resp_contact, serial, refresh, retry, expire, minimum FROM records
WHERE zone = '%zone%' AND type <> 'SOA' AND type <> 'NS'}
{SELECT zone FROM xfr where zone='%zone%' AND client = '%client%'}";
};
启动报错
# /usr/local/named/sbin/named -g -d 1 &
[1] 1855
[root@ns1 src]# 25-Jul-2008 14:01:32.176 starting BIND 9.5.0-P1 -g -d 1
25-Jul-2008 14:01:32.178 loading configuration from '/usr/local/named/etc/named.conf'
25-Jul-2008 14:01:32.186 listening on IPv4 interface lo, 127.0.0.1#53
25-Jul-2008 14:01:32.186 listening on IPv4 interface eth0, xxx.xxx.xxx.xxx#53
25-Jul-2008 14:01:32.187 listening on IPv4 interface eth1, 192.168.1.156#53
25-Jul-2008 14:01:32.188 Loading 'vale.com.cn' using driver mysql
25-Jul-2008 14:01:32.193 mysql driver failed to create database connection after 4 attempts
25-Jul-2008 14:01:32.193 SDLZ driver failed to load.
25-Jul-2008 14:01:32.193 DLZ driver failed to load.
25-Jul-2008 14:01:32.193 load_configuration: failure
25-Jul-2008 14:01:32.193 loading configuration: failure
25-Jul-2008 14:01:32.193 exiting (due to fatal error) |
|