Homebrew をインストールし、それを使用して bind をインストールするのが最善の方法のようです。
ちょっとした「落とし穴」はほとんどないので、この bash スクリプトをまとめてすべてを簡素化しました。
1) Homebrew をインストールします。
2) このファイルを「ConfigureBrewBindOnOSX10_9.sh」として Mac に保存して実行するか ( sh ./ConfigureBrewBindOnOSX10_9.sh
)、コマンドを 1 行ずつ手動で実行します (詳細を確認したい場合は.
ConfigureBrewBindOnOSX10_9.shの内容
#!/bin/bash
# Last Updated: Jun 17, 2014
# camden@arrowtech.net
#
# Run as root or sudo the commands that need it as you go.
# 1) USE HOMEBREW TO INSTALL BIND
brew install bind
# 2) CONFIGURE BIND
# Create a custom launch key for BIND
/usr/local/sbin/rndc-confgen > /etc/rndc.conf
head -n 6 /etc/rndc.conf > /etc/rndc.key
# Set up a basic named.conf file.
# You may need to replace 9.10.0-P2 with the current version number if it is out of date.
cat > /usr/local/homebrew/Cellar/bind/9.10.0-P2/etc/named.conf <<END
//
// 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";
};
//
// 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; };
};
logging {
category default {
_default_log;
};
channel _default_log {
file "/Library/Logs/named.log";
severity info;
print-time yes;
};
};
END
# Symlink Homebrew's named.conf to the typical /etc/ location.
ln -s /usr/local/homebrew/Cellar/bind/9.10.0-P2/etc/named.conf /etc/named.conf
# Create directory that bind expects to store zone files
mkdir /var/named
curl http://www.internic.net/domain/named.root > /var/named/named.ca
# 3) CREATE A LuanchDaemon FILE:
cat > /System/Library/LaunchDaemons/org.isc.named.plist <<END
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Disabled</key>
<false/>
<key>EnableTransactions</key>
<true/>
<key>Label</key>
<string>org.isc.named</string>
<key>OnDemand</key>
<false/>
<key>ProgramArguments</key>
<array>
<string>/usr/local/sbin/named</string>
<string>-f</string>
</array>
<key>ServiceIPC</key>
<false/>
</dict>
</plist>
END
chown root:wheel /System/Library/LaunchDaemons/org.isc.named.plist
chmod 644 /System/Library/LaunchDaemons/org.isc.named.plist
# Shutdown bind (if it was running)
#launchctl unload /System/Library/LaunchDaemons/org.isc.named.plist
# Launch BIND and set it to start automatically on system reboot.
launchctl load -wF /System/Library/LaunchDaemons/org.isc.named.plist
助けが必要な場合はお知らせください。静かないくつかのマシンでこれを正常に構成しました。