bind 9.10编译安装
来源:互联网 发布:html怎么外链js 编辑:程序博客网 时间:2024/04/27 21:01
---1.环境配置--1.1SELinux/usr/sbin/sestatus -v | grep "SELinux status"vi /etc/selinux/configSELINUX=disabled---1.2.配置yum源cd /etc/yum.repos.dmv CentOS-Base.repo CentOS-Base.repo.oldwget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repoyum makecache检查可更新的rpm包#yum check-update 更新所有的rpm包#yum update--1.3 安装上传软件yum install lrzsz -y 二、 所需软件 https://www.isc.org/downloadables/下载bind软件.编译安装之前将系统默认安装的卸载!--2.1 解压、安装#mkdir -p /soft# tar xvzf bind-9.10.3-P2.tar.gz && cd bind-9.10.3-P2/# ./configure --prefix=/usr/local/bind --enable-threads --enable-largefile --disable-ipv6# make && make install安装好以后查看其版本:# /usr/local/bind/sbin/named -vBIND 9.10.3-P2 <id:f9be8b2>--2.2 主配置文件#cd /usr/local/bind/etc/#/usr/local/bind/sbin/rndc-confgen > rndc.conf#cat rndc.conf > rndc.key#chmod 777 /usr/local/bind/var#tail -10 rndc.conf | head -9 | sed s/#\ //g > named.conf#vi /usr/local/bind/etc/named.confoptions { directory "/usr/local/bind/var"; pid-file "named.pid"; };zone "." { type hint; file "named.ca";};*****************备注options {directory "/usr/local/bind/var"; //域名文件存放的绝对路径pid-file "named.pid"; //如果bind启动,自动会在/usr/local/bind/var/目录生成一个named.pid文件,打开文件就是named进程的ID};zone "." IN { type hint; //根域名服务器 file "named.ca"; //存放在/usr/local/bind/var/目录,文件名为named.ca};*****************备注--2.3 挖掘DNS工具,查看根(这里要到官方网站上更新DNS文件,服务器IP地址需要能够上网)# dig -t NS .产生named.ca文件# dig -t NS . >/usr/local/bind/var/named.ca--2.4 运行DNS服务#/usr/local/bind/sbin/named#tail /var/log/messages--2.5 检查状态# /usr/local/bind/sbin/rndc statusWARNING: key file (/usr/local/bind/etc/rndc.key) exists, but using default configuration file (/usr/local/bind/etc/rndc.conf)version: BIND 9.10.3-P2 <id:f9be8b2>boot time: Tue, 12 Jan 2016 03:14:10 GMTlast configured: Tue, 12 Jan 2016 03:14:10 GMTCPUs found: 1worker threads: 1UDP listeners per interface: 1number of zones: 99debug level: 0xfers running: 0xfers deferred: 0soa queries in progress: 0query logging is OFFrecursive clients: 0/0/1000tcp clients: 0/100server is up and running/*******************查看日志文件#cat /var/log/messages | grep named配置DNS(通过自己的计算机解析DNS)---可选# echo "nameserver 127.0.0.1" >/etc/resolv.conf三、添加本地DNS服务器解析文件# ln -s /usr/local/bind/etc/named.conf /etc/--3.1正向解析# vi /etc/named.conf#正向解析zone "localhost"{ type master; file "localhost.zone";};zone "jinri.com"{ type master; file "jinri.com.zone";};# vi /usr/local/bind/var/localhost.zone$TTL 38400@ IN SOA localhost. root ( 2009040701 ;serial 1H ;refresh 15M ;retry 1W ;expire 1D ) ;TTL IN NS @ IN A 127.0.0.1#chmod 640 /usr/local/bind/var/localhost.zone# vi /usr/local/bind/var/jinri.com.zone$TTL 38400@ IN SOA bind.jinri.com. root ( 2009040701 ;serial 1H ;refresh 15M ;retry 1W ;expire 1D ) ;TTL@IN NS bind@ IN MX 10 mailbind IN A 192.168.1.140mail IN A 192.168.1.140storage IN A 192.168.50.88node01 IN A 192.168.50.100node02 IN A 192.168.50.200#chmod 640 /usr/local/bind/var/jinri.com.zone链接bind命令ln -s /usr/local/bind/sbin/* /usr/bin/重新加载# rndc reload---3.2 反向解析文件# vi /etc/named.conf#反向解析zone"0.0.127.in-addr.arpa" in {type master;file "named.local";allow-update { none; };};zone "50.168.192.in-addr.arpa" in {type master;file "jinri.local";allow-update { none; };};# vi /usr/local/bind/var/named.local------------------------------------------$TTL 384000.0.127.in-addr.arpa. IN SOA bind.china.com. root(2009040701 ;serial3H ; refresh15M ;retry1W ;expiry1D) ;minimumIN NS bind.jinri.com.1IN PTR bind.jinri.com.# vi /usr/local/bind/var/jinri.local------------------------------------------$TTL 3840050.168.192.in-addr.arpa. IN SOA bind.jinri.com. root(2009040701;serial3H ; refresh15M ;retry1W ;expiry1D) ;minimumIN NS bind.jinri.com.88IN PTR storage.jinri.com.100IN PTR node01.jinri.com.200IN PTR node02.jinri.com.#named-checkconf测试配置:正向解析:成功!反向解析:成功!没有50的记录!所以不能成功!------4.验证DNS--4.1 修改服务器的nameserverecho "nameserver 223.5.5.5" >/etc/resolv.conf--4.2 测试# dig -t A node01.jinri.com @192.168.1.140; <<>> DiG 9.8.2rc1-RedHat-9.8.2-0.37.rc1.el6 <<>> -t A node01.jinri.com @192.168.1.140;; global options: +cmd;; Got answer:;; ->>HEADER<<- opcode: QUERY, status: SERVFAIL, id: 59819;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0;; QUESTION SECTION:;node01.jinri.com.INA;; Query time: 0 msec;; SERVER: 192.168.1.140#53(192.168.1.140);; WHEN: Tue Jan 12 11:46:11 2016;; MSG SIZE rcvd: 34# nslookup> set q=A> node01.jinri.comServer:127.0.0.1Address:127.0.0.1#53Name:node01.jinri.comAddress: 192.168.50.100> node02.jinri.comServer:127.0.0.1Address:127.0.0.1#53Name:node02.jinri.comAddress: 192.168.50.200> storage.jinri.comServer:127.0.0.1Address:127.0.0.1#53Name:storage.jinri.comAddress: 192.168.50.88
1 0
- bind 9.10编译安装
- Bind 9.10.1编译安装测试
- 编译安装bind
- bind-9.4.2编译安装
- 编译安装Bind的过程
- bind编译安装(精简版)
- 终于完成了bind9 + mysql-bind 的编译安装
- bind 安装
- 安装bind
- bind-geoip编译使用说明
- bind编译和配置
- bind安装配置
- linux下安装bind
- bind安装过程整理
- Bind 9 安装
- centos6.4安装bind
- DNS BIND安装测试
- centos下安装bind
- STM32 RTC更新时间计数器RTC_CNT后在函数RTC_WaitForLastTask()中死循环的原因
- STM32-串口超时判断方式接收未知长度数据
- jQuery全选选择器(基本上来自慕课网)
- LeetCode Range Sum Query - Mutable
- windows消息机制
- bind 9.10编译安装
- PHP运行模式
- Android 访问WebService
- cloud instance 用户配置
- SQL Server: 如何快速将多个数据库文件的增长改为50MB
- 数据库_MySQL_利用 存储过程 对 数据表 中的 每一条记录 进行业务处理
- cocos studio的配置的变量名称如何在程序中引用
- Android开发中网络请求的压缩 ── GZip的使用
- IDA*算法解决十五数码问题