DNS配置
原创
©著作权归作者所有:来自51CTO博客作者次渠龙哥的原创作品,请联系作者获取转载授权,否则将追究法律责任
1.挂载光盘
[root@AAA ~]# mount /dev/cdrom /mnt/
2.安装DNS
[root@AAA named]# yum -y install bind*
===================================================
===================================================
3.查看安装
[root@AAA Server]# rpm -qa |grep bind
bind-libbind-devel-9.3.4-10.P1.el5
bind-sdb-9.3.4-10.P1.el5
bind-chroot-9.3.4-10.P1.el5
bind-libs-9.3.4-10.P1.el5
bind-devel-9.3.4-10.P1.el5
ypbind-1.19-11.el5
bind-utils-9.3.4-10.P1.el5
bind-9.3.4-10.P1.el5
===================================================
===================================================
4.进入etc目录 配置主文件
[root@AAA ~]# cd /var/named/chroot/etc/
[root@AAA etc]# vi named.conf
options {
directory "/var/named";
};
zone "liubao.com"{
type master;
file "liubao.com.zone";
};
zone "18.168.192.in-addr.arpa"{
type master;
file "liubao.com.192.168.18";
};
=====================================================
=====================================================
5. 配置正解文件
[root@AAA ~]# cd /var/named/chroot/var/named
[root@AAA named]# vi liubao.com.zone
$TTL 86400
@ IN SOA localhost root (
42 ;serial (d.adams)
3H ;refresh
15M ;retry
1W ;expiry
1D ) ;minimum
liubao.com. IN NS www.liubao.com.
WWW IN A 192.168.18.114
=====================================================
=====================================================
6.配置反解文件
[root@AAA named]# vi liubao.com.192.168.18
$TTL 86400
@ IN SOA localhost root (
42 ;serial (d.adams)
3H ;refresh
15M ;retry
1W ;expiry
1D ) ;minimum
IN NS www.liubao.com.
114 IN PTR www.liubao.com.
7.保证此文件为空
[root@AAA etc]# vim /etc/resolv.conf
=================================================
=================================================
8. 改权限 和 测试
[root@AAA named]# chown named.named liubao.com.*
[root@AAA named]# ll
总计 20
drwxrwx--- 2 named named 4096 2004-08-26 data
-rw-r--r-- 1 named named 444 11-24 06:56 liubao.com.192.168.18
-rw-r--r-- 1 named named 444 11-24 06:55 liubao.com.zone
-rw-r--r-- 1 named named 443 11-23 07:09 liubao,localdomain.zone
-rw-r--r-- 1 named named 0 11-23 06:59 liubao.localdomain.zone
drwxrwx--- 2 named named 4096 2004-07-27 slaves
[root@AAA named]# service named restart
停止 named:[确定]
启动 named:[确定]
[root@AAA named]# host www.liubao.com
www.liubao.com has address 192.168.18.114
===============================================
===============================================
9.开启浏览器
[root@AAA named]# service httpd start
启动 httpd:httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
[确定]
[root@AAA named]# cd /var/www/html/
=========================================
=========================================
10.查看浏览器内容
[root@AAA html]# ls
[root@AAA html]# cat index.html
上一篇:Samba 企业实战与应用
下一篇:iptables脚本
提问和评论都可以,用心的回复会被更多人看到
评论
发布评论
相关文章
-
DNS及DNS主从配置
DNS及DNS主从配置
DNS及DNS主从配置