首先安装dnsmasq yum install dnsmasq -y service dnsmasq start 然后配置解析 vi /etc/dnsmasq.conf 所有域名解析到本地 address=/#/127.0.0.1