就像你前面看到的那样,要在Linux或者MS Windows中搭建一个DNS其实都是挺麻烦的一件事情。
Linux:http://d-prototype.com/archives/467
MS Windows:http://d-prototype.com/archives/2939

本文接下来将呈现的方式可以让DNS的配置比起上述两个实现要简单得多。

它主要靠两个东西实现:
1. /etc/hosts
2. dnsmasq

下面开始:
一、确认是否安装了dnsmasq软件包:

当前环境已安装了:dnsmasq,并且状态是关闭的。
如果没有安装dnsmasq,那么可以通过YUM简单的完成安装:yum install dnsmasq

启动dnsmasq服务,并开机生效:

配置/etc/hosts:

测试:

————————————————————————
Done。

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

隐藏
变装