Fully compile and install BIND-9.2.3 on RHAS3 -- Linux Enterprise Application-Linux server application information. The following is a detailed description. Install BIND9:
# Tar zxvf bind-9.2.3.tar.gz
# Cd bind-9.2.3
#./Configure
-- Prefix =/usr/local/named
Disable-ipv6
# Make
# Make install
Zone "0.0.127.IN-ADDR. ARPA "{
Type master;
File "localhost ";
};
Zone "home.com "{
Type slave;
File "home.com ";
Masters {
192.168.0.1;
};
};
Zone "0.168.192.in-addr. arpa "{
Type slave;
File "0.168.192.in-addr ";
Masters {
192.168.0.1;
};
};
======================================= Named. conf =
# Vi/usr/local/named/etc/home.com
============================== Home.com ============== ====================
$ TTL 86400
$ ORIGIN home.com.
@ In soa redhat.home.com. root.home.com (
2001111601; serial
28800; refresh
14400; retry
3600000; expire
86400; default_ttl
)
In ns redhat.home.com.
; -- Default address-
@ In a 192.168.0.1
; -- Redhat SerVer --
Redhat in a 192.168.0.1
In mx 0 redhat.home.com.
In mx 10 linux.home.com
In hinfo "redhat as 3.0 ".
In txt "The internet gateway ".
; --- WIN2K SerVer ---
Win2k in a 192.168.0.10
In mx 0 win2k.home.com.
In mx 10 redhat.home.com.
In hinfo "windows 2000 server ".
; ------ Cnames ------
Dns in cname redhat
Www in cname redhat
Mail in cname redhat
Ftp in cname redhat
============================== Home.com ============== ====================
# Vi/usr/local/named/etc/0.168.192.in-addr
=======================================0.168.192.in-addr ==================== ==========
$ TTL 86400
@ In soa redhat.home.com. root.home.home.com .(
2001111601; Serial
28800; refresh
14400; retry
3600000; expire
86400); minimum
@ In ns redhat.home.com.
1 in ptr dns.home.com.
1 in ptr www.home.com.
1 in ptr mail.home.com.
1 in ptr ftp.home.com.
10 in ptr win2k.home.com.
=======================================0.168.192.in-addr ==================== ==========
# Vi/usr/local/named/etc/localhost
====================================== Localhost ================== ====================
$ TTL 3600
@ In soa redhat.home.com. root.home.home.com .(
20040526; Serial
3600; Refresh
900; Retry
3600000; Expire
3600); Minimum
In ns redhat.home.com.
1 in ptr localhost.home.com.
====================================== Localhost ================== ====================
In rndc. conf:
# Use with the following in named. conf, adjusting the allow list as needed:
Add the following parts to/usr/local/named/etc/named. conf and remove the comments.
# Vi/etc/init. d/named
================================ Named. sh ==================================
#! /Bin/bash
#
# Named a network name service.
#
#
# Chkconfig: 545 35 75
# Description: a name server
#
If ['id-U'-ne 0]
Then
Echo "ERROR: For bind to port 53, must run as root ."
Exit 1
Fi
Case "$1" in
Start)
If [-x/usr/local/named/sbin/named]; then
/Usr/local/named/sbin/named-u bind-c/usr/local/named/etc/named. conf & echo. & echo 'bind9 server started .'
Fi
;;
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.