概述
Mac 部署 DNS 纯粹是为了测试和理解 DNS 的功能,实际生产环境中是不太可能存在这种场景的。
操作
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
# brew install dnsmasq
Updating Homebrew...
==> Auto-updated Homebrew!
Updated 2 taps (homebrew/cask and homebrew/services).
==> Downloading https://homebrew.bintray.com/bottles/dnsmasq-2.80.sierra.bottle.1.tar.gz
==> Downloading from https://akamai.bintray.com/ea/eac459e515128a405939939da7dd15f4b3f6ad4bede132b18d6d40f84330ae5e
######################################################################## 100.0%
==> Pouring dnsmasq-2.80.sierra.bottle.1.tar.gz
==> Caveats
To have launchd start dnsmasq now and restart at startup:
sudo brew services start dnsmasq
==> Summary
🍺 /usr/local/Cellar/dnsmasq/2.80: 8 files, 531.5KB
# brew services start dnsmasq
Password:
Warning: Taking root:admin ownership of some dnsmasq paths:
/usr/local/Cellar/dnsmasq/2.80/sbin
/usr/local/Cellar/dnsmasq/2.80/sbin/dnsmasq
This will require manual removal of these paths using `sudo rm` on
brew upgrade/reinstall/uninstall.
==> Successfully started `dnsmasq` (label: homebrew.mxcl.dnsmasq)
# ps aux | grep dnsmasq
runzhliu 17963 0.0 0.0 2464104 1072 s013 R+ 8:47上午 0:00.00 grep --color=auto --exclude-dir=.bzr --exclude-dir=CVS --exclude-dir=.git --exclude-dir=.hg --exclude-dir=.svn dnsmasq
nobody 17834 0.0 0.0 2460700 2112 ?? Ss 8:47上午 0:00.01 /usr/local/opt/dnsmasq/sbin/dnsmasq --keep-in-foreground -C /usr/local/etc/dnsmasq.conf
|
参考资料
- dns
警告
本文最后更新于 2017年2月1日,文中内容可能已过时,请谨慎参考。