Bind + MySQL средствами emerge?

Здравствуйте, сообщество.
Разучился я ручками ставить пакеты, не потому что лень, а потому что есть Gentoo Linux, по сему интересует вопрос, возможно ли средствами emerge установить bind с поддержкой MySQL?

info bind # equery uses mysql
[ Searching for packages matching mysql... ]
[ Colour Code : set unset ]
[ Legend : Left column (U) - USE flags from make.conf ]
[ : Right column (I) - USE flags packages was installed with ]
[ Found these USE variables for dev-db/mysql-5.0.70-r1 ]
U I
+ + berkdb : Adds support for sys-libs/db (Berkeley DB for MySQL)
+ + big-tables : Make tables contain up to 1.844E+19 rows
- - cluster : Add support for NDB clustering
- - debug : Enable extra debug codepaths, like asserts and extra output. If you want to get meaningful backtraces see http://www.gentoo.org/proj/en/qa/backtraces.xml
- - embedded : Build embedded server (libmysqld)
+ + extraengine : Add support for alternative storage engines
+ + latin1 : Use LATIN1 encoding instead of UTF8
- - max-idx-128 : Raise the max index per table limit from 64 to 128
- - minimal : Install a very minimal build (disables, for example, plugins, fonts, most drivers, non-critical features)
+ + perl : Adds support/bindings for the Perl language
- - selinux : !!internal use only!! Security Enhanced Linux support, this must be set by the selinux profile or breakage will occur
+ + ssl : Adds support for Secure Socket Layer connections
- - static : !!do not set this during bootstrap!! Causes binaries to be statically linked instead of dynamically
info bind #

______________________________
info bind # equery uses bind
[ Searching for packages matching bind... ]
[ Colour Code : set unset ]
[ Legend : Left column (U) - USE flags from make.conf ]
[ : Right column (I) - USE flags packages was installed with ]
[ Found these USE variables for net-dns/bind-9.4.3_p2 ]
U I
+ + berkdb : Adds support for sys-libs/db (Berkeley DB for MySQL)
- - dlz : Enables dynamic loaded zones, 3rd party extension
- - doc : Adds extra documentation (API, Javadoc, etc)
- - idn : Enable support for Internationalized Domain Names
- - ipv6 : Adds support for IP version 6
- - ldap : Adds LDAP support (Lightweight Directory Access Protocol)
+ + mysql : Adds mySQL Database support
+ + odbc : Adds ODBC Support (Open DataBase Connectivity)
- - postgres : Adds support for the postgresql database
- - resolvconf : Enable support for net-dns/resolvconf
- - selinux : !!internal use only!! Security Enhanced Linux support, this must be set by the selinux profile or breakage will occur
+ + ssl : Adds support for Secure Socket Layer connections
+ + threads : Adds threads support for various packages. Usually pthreads
- - urandom : Use /dev/urandom instead of /dev/random
info bind #

______________________

info bind # /etc/init.d/named restart
* Stopping named ... [ ok ]
* Starting named ... [ ok ]

______________________

info bind # tail -n 36 /var/log/messages

May 28 19:00:02 info named[6622]: starting BIND 9.4.3-P2 -u named -n 1
May 28 19:00:02 info named[6622]: found 1 CPU, using 1 worker thread
May 28 19:00:02 info named[6622]: using up to 4096 sockets
May 28 19:00:02 info named[6622]: loading configuration from '/etc/bind/named.conf'
May 28 19:00:02 info named[6622]: max open files (1024) is smaller than max sockets (4096)
May 28 19:00:02 info named[6622]: using default UDP/IPv4 port range: [1024, 65535]
May 28 19:00:02 info named[6622]: using default UDP/IPv6 port range: [1024, 65535]
May 28 19:00:02 info named[6622]: listening on IPv4 interface lo, 127.0.0.1#53
May 28 19:00:02 info named[6622]: listening on IPv4 interface eth0, 192.168.20.10#53
May 28 19:00:02 info named[6622]: automatic empty zone: 0.IN-ADDR.ARPA
May 28 19:00:02 info named[6622]: automatic empty zone: 254.169.IN-ADDR.ARPA
May 28 19:00:02 info named[6622]: automatic empty zone: 2.0.192.IN-ADDR.ARPA
May 28 19:00:02 info named[6622]: automatic empty zone: 255.255.255.255.IN-ADDR.ARPA
May 28 19:00:02 info named[6622]: automatic empty zone: 0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.IP6.ARPA
May 28 19:00:02 info named[6622]: automatic empty zone: 1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.IP6.ARPA
May 28 19:00:02 info named[6622]: automatic empty zone: D.F.IP6.ARPA
May 28 19:00:02 info named[6622]: automatic empty zone: 8.E.F.IP6.ARPA
May 28 19:00:02 info named[6622]: automatic empty zone: 9.E.F.IP6.ARPA
May 28 19:00:02 info named[6622]: automatic empty zone: A.E.F.IP6.ARPA
May 28 19:00:02 info named[6622]: automatic empty zone: B.E.F.IP6.ARPA
May 28 19:00:02 info named[6622]: command channel listening on 127.0.0.1#953
May 28 19:00:02 info named[6622]: zone 127.in-addr.arpa/IN: loaded serial 2008122601
May 28 19:00:02 info named[6622]: unsupported database type 'mysqldb'
May 28 19:00:02 info named[6622]: zone mydomain.com/IN: loading zone: creating database: not found
May 28 19:00:02 info named[6622]: zone localhost/IN: loaded serial 2008122601
May 28 19:00:02 info named[6622]: running

info bind # tail -n 6 /etc/bind/named.conf

zone "mydomain.com" {
type master;
notify no;
database "mysqldb dns mydomain localhost **** ****";

Есть у кого размышления на етот счёт?

named.conf для комплекта

named.conf для комплекта покажите .
и да, bind в chroote стоит ?

Compute:
Bosch M2.8.1 -> custom Bosch M2.8.3 clone from Russia.
Speed about 260 km,Ram 2 pers.,HDD - 70 kg,210 FLOPS ;)

1) Все основные опции я

1) Все основные опции я показал в конфиге, остально отношение к мускулу не имеет.
2) Запускать бинд пробовал как в chroot окружении так и без оного, результат в посте № 1!

Цитата:info bind # equery

Цитата:
info bind # equery uses bind

+ + mysql : Adds mySQL Database support

Я чего-то не понимаю в вопросе?

Текстовый редактор vi имеет два режима работы: в первом он пищит, а во втором — всё портит.

Нет Вас не обманывает зрение,

Нет Вас не обманывает зрение, бинд вроде как бы и собран с поддержкой MySQL, но на самом деле поддержки нет.

ldd `which named` что говорит

ldd `which named`
что говорит ?

Compute:
Bosch M2.8.1 -> custom Bosch M2.8.3 clone from Russia.
Speed about 260 km,Ram 2 pers.,HDD - 70 kg,210 FLOPS ;)

info ~ # ldd `which named`

info ~ # ldd `which named`
linux-gate.so.1 => (0xb7fcb000)
liblwres.so.30 => /usr/lib/liblwres.so.30 (0xb7fb2000)
libdns.so.36 => /usr/lib/libdns.so.36 (0xb7e82000)
libbind9.so.30 => /usr/lib/libbind9.so.30 (0xb7e77000)
libisccfg.so.30 => /usr/lib/libisccfg.so.30 (0xb7e64000)
libisccc.so.30 => /usr/lib/libisccc.so.30 (0xb7e5c000)
libisc.so.36 => /usr/lib/libisc.so.36 (0xb7e17000)
libmysqlclient.so.15 => /usr/lib/mysql/libmysqlclient.so.15 (0xb7cb9000)
libssl.so.0.9.8 => /usr/lib/libssl.so.0.9.8 (0xb7c74000)
libcrypto.so.0.9.8 => /usr/lib/libcrypto.so.0.9.8 (0xb7b29000)
libz.so.1 => /lib/libz.so.1 (0xb7b16000)
libcrypt.so.1 => /lib/libcrypt.so.1 (0xb7ae4000)
libm.so.6 => /lib/libm.so.6 (0xb7abe000)
libdb-4.5.so => /usr/lib/libdb-4.5.so (0xb79a3000)
libodbc.so.1 => /usr/lib/libodbc.so.1 (0xb793f000)
libltdl.so.3 => /usr/lib/libltdl.so.3 (0xb7937000)
libdl.so.2 => /lib/libdl.so.2 (0xb7933000)
libpthread.so.0 => /lib/libpthread.so.0 (0xb791b000)
libnsl.so.1 => /lib/libnsl.so.1 (0xb7904000)
libc.so.6 => /lib/libc.so.6 (0xb77c9000)
/lib/ld-linux.so.2 (0xb7fcc000)

Но хочу заметить, что это уже вывод пересобранного бинда с поддержкой динамической загрузки зон 'dlz'

Альтернатива или

Альтернатива или решение!:

1) info ~ # echo /etc/portage/package.use >> net-dns/bind -ipv6 -ldap mysql -postgres odbc threads dlz -idn
2) info ~ # emerge -av bind
3) mysql:
-- phpMyAdmin SQL Dump
-- version 2.11.9.4
-- http://www.phpmyadmin.net
--
-- Хост: localhost
-- Время создания: Май 29 2009 г., 01:16
-- Версия сервера: 5.0.70
-- Версия PHP: 5.2.9-pl2-gentoo

SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";

--
-- База данных: `dns`
--

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

--
-- Структура таблицы `mydomain`
--

CREATE TABLE IF NOT EXISTS `mydomain` (
`id` int(11) NOT NULL auto_increment,
`zone` varchar(64) default NULL,
`host` varchar(64) default NULL,
`type` varchar(8) default NULL,
`data` varchar(64) default NULL,
`ttl` int(11) NOT NULL default '3600',
`mx_priority` int(11) default NULL,
`refresh` int(11) NOT NULL default '3600',
`retry` int(11) NOT NULL default '3600',
`expire` int(11) NOT NULL default '86400',
`minimum` int(11) NOT NULL default '3600',
`serial` bigint(20) NOT NULL default '2008082700',
`resp_person` varchar(64) NOT NULL default 'resp.person.email',
`primary_ns` varchar(64) NOT NULL default 'ns1.yourdns.here',
`data_count` int(11) NOT NULL default '0',
PRIMARY KEY (`id`),
KEY `host` (`host`),
KEY `zone` (`zone`),
KEY `type` (`type`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=9 ;

--
-- Дамп данных таблицы `mydomain`
--

INSERT INTO `mydomain` (`id`, `zone`, `host`, `type`, `data`, `ttl`, `mx_priority`, `refresh`, `retry`, `expire`, `minimum`, `serial`, `resp_person`, `primary_ns`, `data_count`) VALUES
(1, 'sv-lan.ru', '@', 'MX', 'sv-lan.ru.', 3600, 0, 3600, 3600, 86400, 3600, 2008082700, 'resp.person.email', 'ns1.yourdns.here', 0),
(2, 'sv-lan.ru', 'www', 'A', '192.168.20.10', 3600, NULL, 3600, 3600, 86400, 3600, 2008082700, 'resp.person.email', 'ns1.yourdns.here', 0),
(3, 'sv-lan.ru', 'www2', 'CNAME', 'www.sv-lan.ru.', 3600, NULL, 3600, 3600, 86400, 3600, 2008082700, 'resp.person.email', 'ns1.yourdns.here', 0),
(4, 'sv-lan.ru', '@', 'A', '192.168.20.10', 3600, NULL, 3600, 3600, 86400, 3600, 2008082700, 'resp.person.email', 'ns1.yourdns.here', 0);

4) В /etc/bind/named.conf >>

dlz "Mysql zone" {
database "mysql
{host=localhost dbname=dns user=user pass=password}
{select zone from mydomain where zone = '%zone%'}
{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 from mydomain where zone = '%zone%' and host = '%record%'}";

};

5) info ~ # /etc/init.d/named restart ... [ ok ]

6) info ~ # tail /var/log/messages

May 29 01:53:46 info named[31617]: starting BIND 9.4.3-P2 -u named -n 1
May 29 01:53:46 info named[31617]: using up to 4096 sockets
May 29 01:53:46 info named[31617]: loading configuration from '/etc/bind/named.conf'
May 29 01:53:46 info named[31617]: max open files (1024) is smaller than max sockets (4096)
May 29 01:53:46 info named[31617]: using default UDP/IPv4 port range: [1024, 65535]
May 29 01:53:46 info named[31617]: using default UDP/IPv6 port range: [1024, 65535]
May 29 01:53:46 info named[31617]: listening on IPv4 interface lo, 127.0.0.1#53
May 29 01:53:46 info named[31617]: listening on IPv4 interface eth0, 192.168.20.10#53
May 29 01:53:46 info named[31617]: Loading 'Mysql zone' using driver mysql
May 29 01:53:46 info named[31617]: automatic empty zone: 0.IN-ADDR.ARPA
May 29 01:53:46 info named[31617]: automatic empty zone: 254.169.IN-ADDR.ARPA
May 29 01:53:46 info named[31617]: automatic empty zone: 2.0.192.IN-ADDR.ARPA
May 29 01:53:46 info named[31617]: automatic empty zone: 255.255.255.255.IN-ADDR.ARPA
May 29 01:53:46 info named[31617]: automatic empty zone: 0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.IP6.ARPA
May 29 01:53:46 info named[31617]: automatic empty zone: 1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.IP6.ARPA
May 29 01:53:46 info named[31617]: automatic empty zone: D.F.IP6.ARPA
May 29 01:53:46 info named[31617]: automatic empty zone: 8.E.F.IP6.ARPA
May 29 01:53:46 info named[31617]: automatic empty zone: 9.E.F.IP6.ARPA
May 29 01:53:46 info named[31617]: automatic empty zone: A.E.F.IP6.ARPA
May 29 01:53:46 info named[31617]: automatic empty zone: B.E.F.IP6.ARPA
May 29 01:53:46 info named[31617]: command channel listening on 127.0.0.1#953
May 29 01:53:46 info named[31617]: zone 127.in-addr.arpa/IN: loaded serial 2008122601
May 29 01:53:46 info named[31617]: zone localhost/IN: loaded serial 2008122601
May 29 01:53:46 info named[31617]: running

7) info ~ # ping sv-lan.ru
PING sv-lan.ru (192.168.20.10) 56(84) bytes of data.
64 bytes from 192.168.20.10: icmp_seq=1 ttl=64 time=0.119 ms
64 bytes from 192.168.20.10: icmp_seq=2 ttl=64 time=0.123 ms
64 bytes from 192.168.20.10: icmp_seq=3 ttl=64 time=0.125 ms
^C
--- sv-lan.ru ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2002ms
rtt min/avg/max/mdev = 0.119/0.122/0.125/0.009 ms

Спасибо откликнувшимся!

Настройки просмотра комментариев

Выберите нужный метод показа комментариев и нажмите "Сохранить установки".