该脚本适用于 CentOS
仅方便使用 https://github.com/zyqf/DNS 建立 DNS
#!/bin/bash
#by HuanMeng
#Blog: https://ihuanmeng.com
githuburl='https://github.com/zyqf/DNS.git'
gitclonedir='/root/github/'
yum install bind git -y;
mkdir ${gitclonedir}
cd ${gitclonedir}
git clone ${githuburl}
\cp DNS/named.conf /etc/named.conf -f
\cp DNS/named.rfc1912.zones/named.rfc1912.zones /etc/named.rfc1912.zones -f
\cp DNS/named/* /var/named/ -r -f
#CentOS6
service iptables stop
chkconfig iptables off
#CentOS7
systemctl disable firewalld
systemctl stop firewalld
service named restart
ifconfig
仅方便使用 https://github.com/zyqf/DNS 建立 DNS
#!/bin/bash
#by HuanMeng
#Blog: https://ihuanmeng.com
githuburl='https://github.com/zyqf/DNS.git'
gitclonedir='/root/github/'
yum install bind git -y;
mkdir ${gitclonedir}
cd ${gitclonedir}
git clone ${githuburl}
\cp DNS/named.conf /etc/named.conf -f
\cp DNS/named.rfc1912.zones/named.rfc1912.zones /etc/named.rfc1912.zones -f
\cp DNS/named/* /var/named/ -r -f
#CentOS6
service iptables stop
chkconfig iptables off
#CentOS7
systemctl disable firewalld
systemctl stop firewalld
service named restart
ifconfig