CentOS5 bind 설치하기
페이지 정보
작성자 차동박 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 댓글 0건 조회 14,803회 작성일 08-06-14 20:01본문
Operation System is the CentOS5.
A IP of this local machine is 111.222.333.444 (i.e, this IP is only example)
A Domain Name is skorea.com
Step1. install bind and cashing-nameserver package using with YUM
[root@localhost]# yum install "bind*"
[root@localhost]# yum install "*name*"
Step2. configure name.conf file
[root@localhost]# vi /etc/named.cashing-nameserver.conf
options {
listen-on port 53 { 127.0.0.1; };
listen-on port 53 { 111.222.333.444; }; // local machine IP
listen-on-v6 port 53 { ::1; };
directory "/var/named";
dump-file "/var/named/data/cache_dump.db";
statistics-file "/var/named/data/named_stats.txt";
memstatistics-file "/var/named/data/named_mem_stats.txt";
query-source port 53;
query-source-v6 port 53;
allow-query { any; }; // modify "localhost" to "any "
};
logging {
channel default_debug {
file "data/named.run";
severity dynamic;
};
};
view localhost_resolver {
// match-clients { localhost; }; // add comment this line from original source
// match-destinations { localhost; }; // add comment this line from original source
recursion yes;
include "/etc/named.rfc1912.zones";
};
Step3. configure rfc1912.zones
[root@localhost]# vi /etc/named.rfc1912.zones
zone "skorea.com" IN { //domain name
type master;
file "skorea.com.zone"; //zone file of domain
allow-update { none; };
};
zone "333.222.111.in-addr.arpa" { //reversal IP
type master;
file "skorea.come.rev";
allow-update { none; };
};
Step4. create ZONE file
[root@localhost]# vi /var/named/chroot/var/named/skorea.com.zone
$TTL 86400
@ IN SOA ns.skorea.com. root.skorea.com. (
28800 ; Refresh
14400 ; Retry
3600000 ; Expire
86400 ) ; Minimum
IN NS ns.skorea.com.
IN MX 0 mail.skorea.com.
;
localhost IN A 127.0.0.1
@ IN A 111.222.333.444
www IN A 111.222.333.444
mail IN A 111.222.333.444
* IN A 111.222.333.444
[root@localhost]ln -s /var/named/chroot/var/named/skorea.com.zone /var/naemd/skorea.com.zone
Step5. create REVERSION file
[root@localhost]# vi /var/named/chroot/var/named/skorea.come.rev
$TTL 86400
@ IN SOA ns.skorea.com. root.skorea.com. (
2007081412 ; Serial
28800 ; Refresh
14400 ; Retry
3600000 ; Expire
86400 ) ; Minimum
IN NS ns.skorea.come.
;
444 IN PTR ns.skorea.com.
444 IN PTR www.skorea.com.
444 IN PTR skorea.come.
A IP of this local machine is 111.222.333.444 (i.e, this IP is only example)
A Domain Name is skorea.com
Step1. install bind and cashing-nameserver package using with YUM
[root@localhost]# yum install "bind*"
[root@localhost]# yum install "*name*"
Step2. configure name.conf file
[root@localhost]# vi /etc/named.cashing-nameserver.conf
options {
listen-on port 53 { 127.0.0.1; };
listen-on port 53 { 111.222.333.444; }; // local machine IP
listen-on-v6 port 53 { ::1; };
directory "/var/named";
dump-file "/var/named/data/cache_dump.db";
statistics-file "/var/named/data/named_stats.txt";
memstatistics-file "/var/named/data/named_mem_stats.txt";
query-source port 53;
query-source-v6 port 53;
allow-query { any; }; // modify "localhost" to "any "
};
logging {
channel default_debug {
file "data/named.run";
severity dynamic;
};
};
view localhost_resolver {
// match-clients { localhost; }; // add comment this line from original source
// match-destinations { localhost; }; // add comment this line from original source
recursion yes;
include "/etc/named.rfc1912.zones";
};
Step3. configure rfc1912.zones
[root@localhost]# vi /etc/named.rfc1912.zones
zone "skorea.com" IN { //domain name
type master;
file "skorea.com.zone"; //zone file of domain
allow-update { none; };
};
zone "333.222.111.in-addr.arpa" { //reversal IP
type master;
file "skorea.come.rev";
allow-update { none; };
};
Step4. create ZONE file
[root@localhost]# vi /var/named/chroot/var/named/skorea.com.zone
$TTL 86400
@ IN SOA ns.skorea.com. root.skorea.com. (
28800 ; Refresh
14400 ; Retry
3600000 ; Expire
86400 ) ; Minimum
IN NS ns.skorea.com.
IN MX 0 mail.skorea.com.
;
localhost IN A 127.0.0.1
@ IN A 111.222.333.444
www IN A 111.222.333.444
mail IN A 111.222.333.444
* IN A 111.222.333.444
[root@localhost]ln -s /var/named/chroot/var/named/skorea.com.zone /var/naemd/skorea.com.zone
Step5. create REVERSION file
[root@localhost]# vi /var/named/chroot/var/named/skorea.come.rev
$TTL 86400
@ IN SOA ns.skorea.com. root.skorea.com. (
2007081412 ; Serial
28800 ; Refresh
14400 ; Retry
3600000 ; Expire
86400 ) ; Minimum
IN NS ns.skorea.come.
;
444 IN PTR ns.skorea.com.
444 IN PTR www.skorea.com.
444 IN PTR skorea.come.
[root@localhost]# in -s /var/named/chroot/var/named/skorea.come.rev /var/named/skorea.com.rev
Step6. start named service
[root@localhost]# service named start
Step7. nslookup
[root@localhost]# nslookup skorea.com
관련링크
- http://onlybible.tistory.com/9 3886회 연결
댓글목록
등록된 댓글이 없습니다.