BUNDY DNSサーバー(BIND10)を収集して構成します。 パート1

静かに手に届くと、まだBIND10に触れています。 まず、この製品に関する少しの歴史。 BIND10の最初のリリースは2013年2月にISCコンソーシアムによって発表されました。2014年4月17日、ISCコンソーシアムはBIND10 1.2.0の最新リリースをリリースし、その後、すべての成果を独立開発者のコ​​ミュニティに移しました。 この決定は、コンソーシアムに2つの代替プロジェクトを開発するためのリソースがないという事実のために行われました。 したがって、彼らはBIND9のみを開発し、BIND10は完全にコミュニティの管理下にあります。 BIND9との混乱を減らすために、GINDHubで新しいプロジェクトが作成され、BIND10のコンソーシアムのすべての成果が転送され、このプロジェクトはBundyと呼ばれました。



さて、実験を始めることができると思います。



新しいコンテナを作成して接続します:

$ docker run --name bundy --hostname=bundy -d -i -t sovicua:jessie $ docker attach bundy
      
      







通常どおり、アセンブリに必要なパッケージを更新してインストールします。

 # apt-get update # apt-get upgrade # apt-get install git-core g++ make pkg-config python3-dev sqlite3 libsqlite3-dev libbotan1.10-dev liblog4cplus-dev libboost-dev python3-setproctitle dnsutils net-tools autoconf autoconf-archive automake libtool
      
      







プロジェクトのソースコードを取得し、アセンブリを完了します。

 # git clone https://github.com/bundy-dns/bundy.git # cd bundy # autoreconf --install --warnings=none # ./configure --prefix=/usr --sysconfdir=/etc --without-werror --enable-experimental-resolver # make
      
      







そして、リゾルバーをビルドするとエラーが発生します...

マスターブランチには、特にリゾルバーアセンブリに必要なsrc / lib / xfrフォルダーにいくつかのファイルがないため、エラーが発生します。 このオプションなしでビルドすると、すべてが正常に機能します。 しかし、すべてを試してみたかったので、別のブランチからソースコードをダウンロードして、すべてを再度収集する必要がありました。

さらに、DHCPサーバー用にMySQLのデータベースストレージを有効にします。 インストールプロセス中に、答えるのは難しくないと思われるいくつかの質問をされます。

 # wget http://dev.mysql.com/get/mysql-apt-config_0.3.6-1debian8_all.deb # dpkg -i mysql-apt-config_0.3.6-1debian8_all.deb
      
      





最新バージョンの選択(DRM-開発者マイルストーンリリース)

 Configuring mysql-apt-config ---------------------------- MySQL APT Repo features MySQL Server along with a variety of MySQL components. You may select the appropriate product to choose the version that you wish to receive. Once you are satisfied with the configuration then select last option 'Apply' to save the configuration. Advanced users can always change the configurations later, depending on their own needs. 1. Server 2. Connector-Python 3. Utilities 4. Apply Which MySQL product do you wish to configure? 1 This configuration program will detect the current state of your system, check for any installed MySQL Server packages, and try to select the most appropriate version of MySQL Server to be installed. If you are not sure which version to choose for yourself, do not change the auto-selected version. Advanced users can always change the version later, depending on their own needs. 1. mysql-5.6 2. mysql-5.7-dmr 3. none Which server version do you wish to receive? 2 MySQL APT Repo features MySQL Server along with a variety of MySQL components. You may select the appropriate product to choose the version that you wish to receive. Once you are satisfied with the configuration then select last option 'Apply' to save the configuration. Advanced users can always change the configurations later, depending on their own needs. 1. Server 2. Connector-Python 3. Utilities 4. Apply Which MySQL product do you wish to configure? 4
      
      





安定バージョンを使用する場合は、次のコマンドを実行する必要があります。

 # dpkg-reconfigure mysql-apt-config
      
      





...使用する必要なソフトウェアバージョンを選択します。

その後、リポジトリデータを更新し、MySQLサーバーをインストールします。

 # apt-get update # apt-get install mysql-server libmysqlclient-dev libz-dev
      
      







MySQLサーバーを起動します

 # service mysql start .. [info] MySQL Community Server 5.7.7-rc is started. # service mysql status [info] MySQL Community Server 5.7.7-rc is running.
      
      







これで、古いソースのディレクトリを削除する前に、再アセンブリの準備ができました。

 # git clone --branch bundyfork --single-branch https://github.com/bundy-dns/bundy.git # cd bundy # autoreconf --install --warnings=none # ./configure --prefix=/usr --sysconfdir=/etc --without-werror --with-dhcp-mysql --enable-experimental-resolver # make
      
      







それで、実験を続けます。

アセンブリが完了したら、インストールを実行します。

 # make install
      
      





最初の打ち上げの準備。

デフォルトでは、DNSおよびDHCPサービスは開始されず、bundyctlユーティリティを使用して個別にアクティブ化する必要があります。 その前に、サービスを管理するユーザーを追加する必要があります。

 # bundy-cmdctl-usermgr add root
      
      





DHCPサーバー用のデータベースを準備することも価値があります。

 # mysql -u root -p mysql> CREATE DATABASE bundy; mysql> CONNECT bundy; mysql> SOURCE /usr/share/bundy/dhcpdb_create.mysql mysql> CREATE USER 'bundy'@'localhost' IDENTIFIED BY 'bundy'; mysql> GRANT ALL ON bundy.* TO 'bundy'@'localhost'; mysql> quit
      
      





これで、このBUNDYがどんな種類の獣であるかを確認する準備が整いました。



行こう...

親システムからstartコマンドを実行します。最初の起動では、-verboseキーを追加することもできます。

 $ docker exec -i -t bundy /usr/sbin/bundy --verbose
      
      





コンテナでは、bundyctlユーティリティを使用してサービスに接続します。これにより、すべてのバンディサービスを管理および構成できます。

 # bundyctl Username: root Password: ["login success"] > help usage: <module name> <command name> [param1 = value1 [, param2 = value2]] Type Tab character to get the hint of module/command/parameters. Type "help(? h)" for help on bundyctl. Type "<module_name> help" for help on the specific module. Type "<module_name> <command_name> help" for help on the specific command. Available module names: help Get help for bundyctl. config Configuration commands. execute Execute a given set of commands Stats Stats daemon tsig_keys The TSIG keyring is stored here Init Init process Logging Logging options data_sources The sources of authoritative DNS data Cmdctl Interface for command and control Msgq The message queue >
      
      





上記で述べたように、デフォルトでは、DNSおよびDHCPサービス(およびその他)は開始されません。それらの初期化には、承認済みDNSサーバーを初期化する既製のスクリプトがあります。 まず、初期化を開始する前に、どのプロセスを開始したかを見てみましょう。

 > Init show_processes [ [ 18493, "Socket creator", null ], [ 18494, "msgq", null ], [ 18496, "cfgmgr", "ConfigManager" ], [ 18498, "bundy-stats", "Stats" ], [ 18499, "bundy-cmdctl", "Cmdctl" ] ]
      
      





初期化スクリプトを実行し、プロセスの現在の内容を再度確認します。

 > execute init_authoritative_server adding Authoritative server component adding Xfrin component adding Xfrout component adding Zone Manager component Components added. Please enter "config commit" to finalize initial setup and run the components. > config commit
      
      





 > Init show_processes [ [ 18493, "Socket creator", null ], [ 18494, "msgq", null ], [ 18496, "cfgmgr", "ConfigManager" ], [ 18498, "bundy-stats", "Stats" ], [ 18499, "bundy-cmdctl", "Cmdctl" ], [ 18559, "bundy-xfrout", "Xfrout" ], [ 18560, "bundy-xfrin", "Xfrin" ], [ 18561, "bundy-zonemgr", "Zonemgr" ], [ 18562, "bundy-auth", "Auth" ] ]
      
      





違いは顕著だと思います:) 4つの新しいプロセスがあります。

-bundy-xfrout

-bundy-xfrin

-bundy-zonemgr

-bundy-auth



DNSサーバーのバージョンを照会して、DNSサーバーの動作を確認します。

 # dig @127.0.0.1 -c CH -t TXT version.bind ; <<>> DiG 9.9.5-9-Debian <<>> @127.0.0.1 -c CH -t TXT version.bind ; (1 server found) ;; global options: +cmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 27337 ;; flags: qr aa rd; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 1 ;; WARNING: recursion requested but not available ;; OPT PSEUDOSECTION: ; EDNS: version: 0, flags:; udp: 4096 ;; QUESTION SECTION: ;version.bind. CH TXT ;; ANSWER SECTION: version.bind. 0 CH TXT "bundy 1.2.0" ;; AUTHORITY SECTION: bind. 0 CH NS bind. ;; Query time: 1 msec ;; SERVER: 127.0.0.1#53(127.0.0.1) ;; WHEN: Fri Jul 03 07:39:41 UTC 2015 ;; MSG SIZE rcvd: 79
      
      





さて、私たちは何を祝福することができますか-コンパイル中の障害にもかかわらず、承認されたDNSサーバーBUNDY | BIND10を開始および初期化することができました。 今日は十分な手紙があると思います。



次のパートでは、bundyに含まれるモジュールと、誰が何を担当するかを少し見ていき、DHCPと他のモジュールの構成を続けます。



All Articles