install and config bind9(named) on linux server

This article shows my process of installing and configuring bind9 DNS server on a linux server. I didn‘t touch every aspects of bind9, but following the process, a DNS server is configured with A/AAAA, NAPTR and SRV resource record types. The DNS server
is able to be used for testing.

## download bind-9.10.0-P1.tar.gz
https://www.isc.org/downloads/bind/

## untar the package
tar xzvf bind-9.10.0-P1.tar.gz

## config and install
cd bind-9.10.0-P1
./configure
./make
./make install 

## test named is installed
named -v
named -g 

## generate rndc.key
cd /etc
rndc-confgen -a

## generate /etc/named.conf with contents
cat /etc/named.conf
zone "lingcloud.com" {
type master;
file "/etc/bind/zones/lingcloud.com.db";
};

## config zone with example contents
cat /etc/bind/zones/lingcloud.com.db
; BIND data file for lingcloud.com
;
$TTL 14400 ;lingcloud.com
;start of authority resource record type. Every domain must have a Start of Authority record at the cutover
ts parent domain.
@ IN SOA ns1.lingcloud.com. host.lingcloud.com. (
201006601 ; Serial
7200 ; Refresh
120 ; Retry
2419200 ; Expire
604800) ; Default TTL
;
; NS record indicate which name server are authoritative for the zone/domain. It is primarily used if you w
lingcloud.com. IN NS ns1.lingcloud.com.
;A record
lingcloud.com. IN A 10.41.104.171
; ns seems to be name server's ip
ns1 IN A 10.41.104.232

nodeB IN A 10.41.104.171
nodeB.realmB IN A 10.41.104.171
nodeC IN A 10.41.104.171
nodeC.realmC IN A 10.41.104.171

;NAPTR record
realmB IN NAPTR 50 100 "s" "aaa:diameter.tcp" "" _diameter._tcp.srvB.realmB.lingcloud.com.
realmC IN NAPTR 51 101 "s" "aaa:diameter.tcp" "" _diameter._tcp.srvC.realmC.lingcloud.com.
;SRV record
_diameter._tcp.srvB.realmB IN SRV 0 1 3868 nodeB.realmB.lingcloud.com.
_diameter._tcp.srvC.realmC IN SRV 0 1 3868 nodeC.realmC.lingcloud.com.

## start named
/usr/local/sbin/named

## check named status
rndc status

## nslookup can be used to query DNS server
 nslookup
> server 127.0.0.1
Default server: 127.0.0.1
Address: 127.0.0.1#53
> lingcloud.com
Server:		127.0.0.1
Address:	127.0.0.1#53

Name:	lingcloud.com
Address: 10.41.104.172
> nodeB.lingcloud.com
Server:		127.0.0.1
Address:	127.0.0.1#53

Name:	nodeB.lingcloud.com
Address: 10.41.104.171
> set type=NAPTR
> realm1.lingcloud.com
Server:		127.0.0.1
Address:	127.0.0.1#53

realm1.lingcloud.com	naptr = 50 100 "s" "aaa:diameter.tcp" "" _diameter._tcp.srv1.lingcloud.com.
> set type=SRV
> _diameter._tcp.srv1
Server:		127.0.0.1
Address:	127.0.0.1#53

_diameter._tcp.srv1.lingcloud.com	service = 0 1 3868 nodeB.lingcloud.com.

Reference:

http://www.servermom.org/how-to-install-and-setup-bind9-on-ubuntu-server/136/

https://kb.isc.org/article/AA-00768/0/Getting-started-with-BIND-how-to-build-and-run-named-with-a-basic-recursive-configuration.html

http://www.centos.org/docs/5/html/Deployment_Guide-en-US/s1-bind-rndc.html

install and config bind9(named) on linux server

时间: 2024-08-01 22:48:04

install and config bind9(named) on linux server的相关文章

ORACLE Install (10g r2) FOR Red Hat Enterprise Linux Server release 5.5 (64 bit) (转)

OS Info----------# cat /etc/redhat-releaseRed Hat Enterprise Linux Server release 5.5 (Tikanga)# cat /etc/issue.netRed Hat Enterprise Linux Server release 5.5 (Tikanga)Kernel r on an m# uname -rm2.6.18-194.el5 x86_64# echo $MACHTYPEx86_64-redhat-linu

How to install JDK (Java Development Kit) on Linux

This tutorial will guide you on how to install JDK (Java Development Kit) on Linux. Since I use Centos 5.4 x86_64 in everyday life, this guide is showing you how to install JDK in Centos 5.4 64bit. It must work in any other Linux distro such as Slack

Install Oracle 10g on Red Hat Linux 5.3 Step by Step

一.虚拟机配置 1. 虚拟机(VBox 4.3.12) 2. 配置虚拟机网卡网络,选择host-only,VirtualBox Host-Only Network网卡IP为设置为192.168.1.100 二.安装RedHat 5.3操作系统(序列号:9f3013459b745c13) 具体过程略,注意在自定义软件包那里选择现在配置,选取"开发工具"."旧的开发工具"."X工具"下所有包即可 三.系统环境配置 1.配置网卡 [[email pro

笔记本电脑玩linux server 笔记--优盘安装centos

手上有空闲的笔记本电脑,刚好想学习linux,于是便开始折腾之路.从自己的需求出发,希望可以达成目标:使用笔记本+有线网络搭建linux服务器,提供以下服务: 1.使用无线提供热点提供路由器的服务(在宿舍里充当无线路由器) 2.提供vpn服务(可以在校外访问只能在校内访问的资源) 3.搭建一个网站,供其他人浏览(没有域名,但是学校提供静态的个人主页,因此希望是通过个人主页的链接跳转到个人网站) 4.网站可以注册,可以玩ACM Online Judge,可以申请vpn服务等 5.没想好 自己毕竟新

在Azure上实现Linux Server故障转移

要充分利用公有云的弹性扩展和高可用, 首先要在应用系统层面支持横向扩展(scale out),这个说起来很容易,或者说对新开发的应用系统而言已经成为标配.但是对已有的.老旧的应用系统来说,这就比较困难了,不是每个应用系统都能实现/支持横向扩展的.从客户的角度来说,基本上很难接受为了把应用系统迁移到公有云上而去额外投入修改应用系统代码.虽然我们都心知肚明,本质上这是在“偿还技术债”,修改应用系统代码也是为了更好地利用公有云的优势... 对于应用系统的横向扩展而言,“状态”是最大的拦路虎,要支持横向

Red Hat Enterprise Linux Server release 7.0双系统安装

Red Hat Enterprise Linux Server release 7.0双系统安装 1.RedHat 公司的企业版7.0已经发布了.下面介绍一下在7.0下装双系统的步骤. 安装前系统:WIN7 要安装的第二个系统:RedHat Enterprise 7.0 @请注意:WIN8系统和企业版7.0不兼容.安装完7.0后,WIN8系统会起不来. @首先BOIS已经确定调好.[注意启用笔记本的高速运转模式],我是用PXE网络来安装的,所以还得设置从PXE网络启动. @接着以PXE启动. @

Use TigerVNC to connect Teamcenter Linux server

Why When deploying and managing TC servers (including Oracle servers) in Linux environment, we need to use desktop env to launch TEM (including DBCA) to manage them. I recommend you to use tigerVNC to connect these Linux servers from your client. Wha

〔原创〕Ubuntu Linux Server 9.04 安装全程图解

关于Ubuntu Linux Server 9.04 版本的安装使用.先声明几点: 1. 整个安装过程,都是全英文的,而且,是文本模式,不像Desktop版本,有Livecd的图形化模式.2. 刚开始光盘引导的时候,必须选择:English !否则在系统安装好以后,如果安装图形化桌面,会因为字体问题导致很多操作都不能顺利进行.(因为看不到文字……都是乱码).所以这还是选择英文好.英语总比乱码好吧?3. 安装之前,断开网络!(不知道怎么断,就拔掉网线)4. Server 版本安装好以后,只有一个“

oracle 11gR2 client安装(Red Hat Enterprise Linux Server release 5.5 (Tikanga) 安装ORACLE客户端)

安装DBD::ORALCE模块时报错: Running Mkbootstrap for DBD::Oracle () chmod 644 Oracle.bs rm -f blib/arch/auto/DBD/Oracle/Oracle.so gcc -shared -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=gener