安装DNS服务器

直接yum 安装

yum install bind-chroot bind -y

DNS配置教程
DNS配置详细介绍
bind-namedmanager安装说明
namemanager安装指南

配置namedmanager整理

1.临时关闭selinux
#setsebool -P httpd_can_network_connect 1

2.改变文件数组

#chgrp named named.conf
#chown named:named /var/named/chroot/etc/named.namedmanager.conf

3.开起服务
#systemctl restart named.service

4.开机自启动
#systemctl enable iptables.service

5.查看hostname

#hostname
localhost.localdomain

6.下载bind时更新yum源

cd /etc/yum.repos.d/
# wget http://repos.amberdms.com/config/centos/6/amberdms-c6-public.repo
# wget https://repos.jethrocarr.com/config/centos/7/jethrocarr-c7-public.repo
# yum makecache
 
# yum -y install namedmanager-www  namedmanager-bind  bind-*
# yum -y install mysql mysql-server mysql-devel httpd php php-mysql 

7.编辑:/etc/namedmanager/config.php
#vim /etc/namedmanager/config-bind.php

8.执行数据库
#cd /usr/share/namedmanager/resources/
#./autoinstall.pl

9.建立硬链接
#ln /etc/named.namedmanager.conf /var/named/chroot/etc/named.namedmanager.conf

10.开启定时日志并开机自启动

#/etc/init.d/namedmanager_logpush restart
#chkconfig --level 345 namedmanager_logpush on

11.设置httpd远程权限
否则出现:You don't have permission to access /namedmanager on this server.

#vim  /etc/httpd/conf/http.conf


    AllowOverride none
    #Require all denied   //备注或去掉该段代码  拒绝所有请求


DocumentRoot "/home/wamp3/www"

    Options +Indexes +FollowSymLinks
    AllowOverride all
    #Require local   //关键 本地请求要去掉

其实就是 去掉 Require all deniedRequire local

12.配置namedmanager的web后执行检测
php -q /usr/share/namedmanager/bind/namedmanager_bind_configwriter.php

13.添加防火墙规则:#vim /etc/sysconfig/iptables

-A INPUT -m state --state NEW -m tcp -p tcp --dport 53 -j ACCEPT
-A INPUT -m state --state NEW -m udp -p udp --dport 53 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 953 -j ACCEPT

你可能感兴趣的:(安装DNS服务器)