Ubuntu12.04 server DNS server 搭建
来源:互联网 发布:传奇霸业 魔血符数据 编辑:程序博客网 时间:2024/05/22 05:29
Ubuntu12.04 server DNSserver 搭建
操作系统:
ubuntu 12.04 server版
使用软件:
Bind9
本机 IP:
10.10.10.15
网 关:
域 名:
10.10.10.1
www.hasee1212.com
.
1、安装bind9
#apt-get -y install bind9 bind9utils
这里我以 hasee1212.com 域名为例
2.配置bind9
查看name.conf配置文件
# cat/etc/name.conf
=====================================================
// This is the primary configuration filefor the BIND DNS server named.
//
// Please read/usr/share/doc/bind9/README.Debian.gz for information on the
// structure of BIND configuration filesin Debian, *BEFORE* you customize
// this configuration file.
//
// If you are just adding zones, please dothat in /etc/bind/named.conf.local
include"/etc/bind/named.conf.options";
include"/etc/bind/named.conf.local";
include"/etc/bind/named.conf.default-zones";
=========================================
接下来针对 /etc/bind/named.conf.default-zones 进行域名添加
# vim/etc/bind/named.conf.default-zones 注意红色的部分
=========================================
// prime the server with knowledge of theroot servers
zone "." {
type hint;
file"/etc/bind/db.root";
};
// be authoritative for the localhostforward and reverse zones, and for
// broadcast zones as per RFC 1912
zone "localhost" {
type master;
file"/etc/bind/db.local";
};
zone "127.in-addr.arpa" {
type master;
file"/etc/bind/db.127";
};
zone "0.in-addr.arpa" {
type master;
file"/etc/bind/db.0";
};
zone "255.in-addr.arpa" {
type master;
file"/etc/bind/db.255";
};
zone "hasee1212.com" {
type master;
file"/etc/bind/hasee1212.local";
};
type master;
file "/etc/bind/db.10";
};
#cp db.localhasee1212.local //hasee1212.local 是正解
#cp db.127 db.10 //db.10是反解
#vim hasee1212.local
#vim db.10
#/etc/init.d/bind9restart
或者#/servicebind9 restart
3、测试
使用命令nslookup,host, dig
root@ubuntu:/etc/bind#nslookup
如果出现问题现在/var/log/syslog 中查找。如果一切正常,可能是本地的DNS没有设置成自己的DNS ip值。在12.04之前,我们只需要修改/etc/resolv.conf便可手动配置DNS了。但在12.04下,却会出现重启后/etc/resolv.conf被重写的情况
解决办法:vim/etc/network/interfaces: 将其中的DNS 改为自己设置的DNS ip 本例中就设置为10.10.10.15即可如图所示:
然后重启:service networking restart 测试,成功!
参考:
1、 Bind9安装设置指南.pdf
2、鸟哥私房菜服务器架设版—DNS服务器
http://vbird.dic.ksu.edu.tw/linux_server/0350dns/0350dns-centos4.php
3、http://www.qianshoublog.com/post/7625.html
- Ubuntu12.04 server DNS server 搭建
- Ubuntu12.04搭建git server
- ubuntu12.04搭建svn server
- Linux dns-server 搭建
- ubuntu12.04server搭建git服务器
- ubuntu12.04 server 源
- ubuntu12.04 lts server 下搭建nginx+uwsgi+webpy服务器
- DNS Server
- DNS Server
- DNS服务器搭建-win-server-2008
- Window server 2008 搭建DNS服务器
- Ubuntu12.04 server安装Gerrit
- ubuntu12.04 server 配置网络
- ubuntu12.04 server 网络配置
- Ubuntu12.04安装NFS server
- Jenkisn + Tomcat7 + Ubuntu12.04 server
- Ubuntu12.04安装vnc Server
- ubuntu12.04重装X server
- 程序员,DBA,架构师,项目管理,一个都不能少!
- linux下将程序中用到的第三方库编译到自己的程序中
- 开源性能测试工具 - Apache ab 介绍
- SQLSERVer2008阻止修改解决方法
- 单例实现的几种方式
- Ubuntu12.04 server DNS server 搭建
- Linux 下 PHP 扩展 PDO 编译安装
- django 数据过滤
- javaScript 实现显示当前时间
- 解决Shockwave flash在chrome浏览器上崩溃的问题
- FileZilla客户端实现分析
- String、StringBuffer和StringBuilder的比较与总结
- Mysql技术内幕InnoDB存储引擎——表&索引算法和锁
- ajax_json_存储过程_无刷新分页功能