欢迎来到天天文库
浏览记录
ID:26459865
大小:101.50 KB
页数:21页
时间:2018-11-27
《bind 配置安装.doc》由会员上传分享,免费在线阅读,更多相关内容在行业资料-天天文库。
1、BIND介绍Bind是一款开放源码的DNS服务器软件,Bind由美国加州大学Berkeley分校开发和维护的,全名为BerkeleyInternetNameDomain它是目前世界上使用最为广泛的DNS服务器软件,支持各种unix平台和windows平台。系统搭建规格System:Centos5.3(64bit)Soft:BIND9.7.0-P1安装步骤下载bind软件BIND URL:BIND官方网站检查必备软件必备软件:openssl编译,安装BIND软件./configure–prefix=/usr/l
2、ocal/named-enable-threads-enable-ipv6-with-openssl=/usr/local/openssl-with-dlz-mysql;make-j6&&makeinstall建立BIND运行用户groupaddbinduseradd-gbind-d/usr/local/named-s/sbin/nologinbind创建配置文件目录mkdir-p/usr/local/named/etcchownbind:bind/usr/local/named/etcchmod770/us
3、r/local/named/etc创建PID和日志文件mkdir-p/var/run/named/chmod777/var/run/named/chownbind:bind/var/run/named/mkdir-p/var/log/named/touch/var/log/named/dns_warningstouch/var/log/named/dns_logschownbind:bind/var/log/named建立启动脚本[/etc/init.d/named]:(用于自动化启动,如果指定特殊配置文件,
4、可以不采用以下脚本)#!/bin/bash##namedThisshellscripttakescareofstartingandstopping#named(BINDDNSserver).##chkconfig:–5545#description:named(BIND)isaDomainNameServer(DNS)#thatisusedtoresolvehostnamestoIPaddresses.#probe:true#Sourcefunctionlibrary../etc/rc.d/init.d/f
5、unctions#Sourcenetworkingconfiguration.[-r/etc/sysconfig/network]&&./etc/sysconfig/network#Checkthatnetworkingisup.[${NETWORKING}="no"]&&exit0[-x/usr/local/named/sbin/named]
6、
7、exit0RETVAL=0prog="named"if[`id-u`-ne0]thenecho"ERROR:Forbindtoport53,mustrunasroo
8、t."exit1ficase"$1"instart)if[-x/usr/local/named/sbin/named];then/usr/local/named/sbin/named-ubind-c/usr/local/named/etc/named.conf&&echo.&&echo‘BIND9serverstarted.’fi;;stop)#kill`cat/var/run/named/pid`&&echo.&&echo‘BIND9serverstopped.’killproc$prog&&echo.&&
9、echo‘BIND9serverstopped.’;;restart)echo.echo"RestartBIND9server"$0stop#sleep10$0start;;*)echo"$0start
10、stop
11、restart";;esac配置启动脚本chmod755/etc/init.d/namedchownroot:root/etc/init.d/namedchkconfig–addnamedchkconfig–level345namedonchkconfig–listnamed以上为BIND软件和环境
12、配置的步骤,接下来是配置BIND软件和DNS解析创建BIND的主配文件named.conf(/usr/local/named/etc/named.conf)acl"corp"{125.69.81.43;192.168.0.0/16;};//信任来源解析IPoptions{directory"/usr/local/named/etc";//定义配置文件地址listen-on{127.0.0.1};pi
此文档下载收益归作者所有