最新更新日:1999年 9月10日
まずは、基本システムをインストールする。 以下にある杉山耕一朗氏のドキュメントに従う。
さらに bind をインストールするが、 上記の dselect を用いて
bind bind-docをインストールする。インストールの際に以下のようなことを聞かれるが、 そのときは次のように答える。
BIND Configuration
------------------
By answering the following questions, you can configure BIND for your system. If your system has already been configured, the default values will allow you to verify your existing configuration.
Press [ENTER]
そのまま [ENTER] を押す。
To answer this question, separate each address with a space, or answer `none' to eliminate all forwarder hosts.
Forwarder IP addresses? []
none と答える。
Localhost Entries
-----------------
With this option, BIND will contain entries for the `localhost' pseudo-host and its reverse mapping (127.0.0.1). This is recommended.
Enable localhost entries? [Y]
yes でよいので、そのまま [ENTER] を押す。
Configuration Complete
----------------------
Advanced configuration, such as sortlists, xfrnets, limits, and other options can be accomplished by manually editing the /var/named/boot.options configuration file and reloading your nameserver. You may wish to refer to the named(8) man page or review the documentation in /usr/doc/net/named to assist in further customization.
This automatic configuration does not manipulate zone files; you should ensure the proper boot entries are made in /var/named/boot.zones for each primary and secondary zone you are serving. If you leave this file empty, your server will act conveniently as a caching-only name server.
Reading boot.zones ...
Reading boot.options ...
Rotated `/etc/named.conf' at Thu Sep 9 21:05:42 JST 1999.
To be most effective, /etc/resolv.conf should list the IP address of your local machine (127.0.0.1) as a nameserver. It currently does not.
Would you like this to be added? [Y]
自分を 1 st ネームサーバとして使うか、と聞かれている。 後で同様の設定をするので、no と答える。
Start nameserver daemon now? [Y]
まだネームサーバの設定をしていないので、 no と答える。
Not started; to start later, do: /etc/init.d/bind start
Press [ENTER]
[ENTER]を押して、インストールは終了である。
インストールが終ったら、本ドキュメント 「3. bind 8.1.2 を使った DNS サーバの設定」に進む。 その際に注意すべきことがらは次の通り。
(1) DNS サーバ "yellow" は、様々な理由から IP アドレス → ホスト名 を 対応付ける 「逆びき」のサービスは行なわないことになっている。 したがってそのための設定が必要である。
(2) 各種設定ファイルについては、yellow マシンの /home/yellow ディレクトリ 以下にあるファイルか、 www-ep マシンの/home/yellow 以下にあるファイルを参照する。 "yellow" の場合、逆びきはしないので、 結局次の 4 つのファイルを設定すればよいことになる。
起動ファイル雛型 : named.boot ← yellow(www-ep):/home/yellow/named.boot
起動ファイル : named.conf ← yellow(www-ep):/home/yellow/named.conf
正びき用ファイル : yellow.zone
← yellow(www-ep):/home/yellow/yellow.zone
ループバックの逆びき用ゾーンファイル : local.rev
← yellow(www-ep):/home/yellow/local.rev
なお、ルートネームサーバを参照するためのファイルは
新たに ftp で取って来たほうがよい(たまには更新される)。
bind の運用
bind の設定が終ったら、設定したファイルをバックアップしておく。 yellow マシンに /home/yellow ディレクトリを作成し、設定したファイル
local.rev named.boot named.root named-bootconf.pl named.conf yellow.zoneをコピーする。さらに www-ep にも同様のディレクトリを作成し、 上記のファイルをリモートコピーする。
# rsync -e ssh local.rev www-ep:/home/yellow/手書きで yellow:/var/named/yellow.zone ファイルを書き換えた場合、 常にバックアップをする。なお、通常は cron によって /home/yellow/ 以下の内容が各専攻サーバに保存されることになっている。