MacOSX Mountain LionでDNSサーバであるbindの導入
まず, 起動するか確認するために, namedコマンドを実行するが起動せず.

原因は, rndc.keyが/private/etcにないらしい

以下のコマンドで追加する

# rndc-confge -a

これで/private/etc/rndc.keyが追加され, とりあえず起動することができる.

/var/namedにゾーンファイルをおく
以下設定した, ゾーンファイルを記す.

db.my-home

$TTL 86400
@	IN	SOA	adam.my-home.	root.my-home. (
			2012072301	; serial
			3600		; refresh
			900		; retry
			360000		; expiry
			3600 )		; minimum
	IN	NS	adam.my-home.
1	IN	PTR	router.my-home.
50	IN	PTR	adam.my-home.
51	IN	PTR	adam-wl.my-home.
52	IN	PTR	dynabook.my-home.
53	IN	PTR	dynabook-wl.my-home.
54	IN	PTR	e3.my-home.
55	IN	PTR	e3-wl.my-home.
56	IN	PTR	cent.my-home.
56	IN	PTR	unix-like.dyndns-web.com.
57	IN	PTR	cent-w.my-home.
70	IN	PTR	vm-windows7.my-home.
71	IN	PTR	vm-windows8.my-home.
80	IN	PTR	iphone.my-home.
81	IN	PTR	walkman.my-home.
82	IN	PTR	aquos.my-home.

db.192.168.1

$TTL 86400
@	IN	SOA	adam.my-home.	root.my-home. (
			2012072301	; serial
			3600		; refresh
			900		; retry
			360000		; expiry
			3600 )		; minimum

	IN	NS	adam.my-home.
1	IN	PTR	router.my-home.
50	IN	PTR	adam.my-home.
51	IN	PTR	adam-wl.my-home.
52	IN	PTR	dynabook.my-home.
53	IN	PTR	dynabook-wl.my-home.
54	IN	PTR	e3.my-home.
55	IN	PTR	e3-wl.my-home.
56	IN	PTR	cent.my-home.
56	IN	PTR	unix-like.dyndns-web.com.
57	IN	PTR	cent-w.my-home.
70	IN	PTR	vm-windows7.my-home.
71	IN	PTR	vm-windows8.my-home.
80	IN	PTR	iphone.my-home.
81	IN	PTR	walkman.my-home.
82	IN	PTR	aquos.my-home.

db.unix-like.dyndns-web.com

$TTL 86400
@       IN      SOA     unix-like.dyndns-web.com.       root.my-home. (
                        2013030301      ; serial
                        3600            ; refresh
                        900             ; retry
                        3600000         ; expiry
                        3600 )          ; minimum
                IN      NS      unix-like.dyndns-web.com.
@       IN      A       192.168.1.54

named.confの設定もまるまる記す

//
// Include keys file
//
include "/etc/rndc.key";

// Declares control channels to be used by the rndc utility.
//
// It is recommended that 127.0.0.1 be the only address used.
// This also allows non-privileged users on the local host to manage
// your name server.

//
// Default controls
//
controls {
	inet 127.0.0.1 port 54 allow {any;}
	keys { "rndc-key"; };
};

options {
	directory "/var/named";
	/*
	 * If there is a firewall between you and nameservers you want
	 * to talk to, you might need to uncomment the query-source
	 * directive below.  Previous versions of BIND always asked
	 * questions using port 53, but BIND 8.1 uses an unprivileged
	 * port by default.
	 */
	// query-source address * port 53;
	// クエリを許可する範囲の指定
	allow-query { 192.168.1.0/24; 127.0.0.1; };
	// ゾーンの転送を行わない
	allow-transfer { none; };
	// ローカルで名前解決ができないときの問い合わせ先
	forwarders { 192.168.1.1; };
	// まず, フォワーダーに問い合わせそれでなければ, 再帰検索をかける
	forward first;
	// 再帰検索を行うホストの設定
	allow-recursion { 127.0.0.1; };
	//ゾーンステートメントで各ゾーンの設定を行う
	empty-zones-enable no;
};
//
// a caching only nameserver config
//
zone "." IN {
	type hint;
	file "named.ca";
};

zone "localhost" IN {
	type master;
	file "localhost.zone";
	allow-update { none; };
};

zone "0.0.127.in-addr.arpa" IN {
	type master;
	file "named.local";
	allow-update { none; };
};

zone "1.168.192.in-addr.arpa" IN {
	type master;
	file "db.192.168.1";
	allow-update { none; };
};

zone "my-home" IN {
	type master;
	file "db.my-home";
	allow-update { none; };
};

zone "unix-like.dyndns-web.com" IN {
	type master;
	file "db.unix-like.dyndns-web.com";
	allow-update { none; };
};

logging {
        category default {
                _default_log;
        };

        channel _default_log  {
                file "/Library/Logs/named.log";
                severity info;
                print-time yes;
        };
};

自動起動の設定は, 以下のコマンドでできる.

# launchctl load -w /System/Library/LaunchDaemons/org.isc.named.plist

/etc/hostconfigにDNSSERVER=-YES-を入れろと他のサイトではあるがなくても起動できる
どうするべきなのだろうか?