<!--StartFragment-->1. 네임서버 설치



    1.1 yum을 이용한 bind 인스톨

[root@localhost ~]# yum install -y bind bind-utils bind-libs bind-chroot caching-nameserver
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* addons: centos.tt.co.kr
* base: centos.tt.co.kr
* extras: centos.tt.co.kr
* updates: centos.tt.co.kr
Setting up Install Process
Package 30:bind-utils-9.3.6-4.P1.el5_4.2.x86_64 already installed and latest version
Package 30:bind-libs-9.3.6-4.P1.el5_4.2.x86_64 already installed and latest version
Resolving Dependencies
--> Running transaction check
---> Package bind.x86_64 30:9.3.6-4.P1.el5_4.2 set to be updated
---> Package bind-chroot.x86_64 30:9.3.6-4.P1.el5_4.2 set to be updated
---> Package bind-libs.i386 30:9.3.6-4.P1.el5_4.2 set to be updated
---> Package caching-nameserver.x86_64 30:9.3.6-4.P1.el5_4.2 set to be updated
--> Finished Dependency Resolution

Dependencies Resolved

==========================================================================================
Package                      Arch                   Version                    Repository            Size
==========================================================================================
Installing:
bind                            x86_64      30:9.3.6-4.P1.el5_4.2                base                 986 k
bind-chroot                  x86_64      30:9.3.6-4.P1.el5_4.2                base                  44 k
bind-libs                      i386          30:9.3.6-4.P1.el5_4.2                base                 857 k
caching-nameserver     x86_64       30:9.3.6-4.P1.el5_4.2               base                  61 k

Transaction Summary
==========================================================================================
Install       4 Package(s)
Upgrade       0 Package(s)

Total download size: 1.9 M
Downloading Packages:
(1/4): bind-chroot-9.3.6-4.P1.el5_4.2.x86_64.rpm                                    |  44 kB     00:00    
(2/4): caching-nameserver-9.3.6-4.P1.el5_4.2.x86_64.rpm                       |  61 kB     00:00    
(3/4): bind-libs-9.3.6-4.P1.el5_4.2.i386.rpm                                           | 857 kB     00:00    
(4/4): bind-9.3.6-4.P1.el5_4.2.x86_64.rpm                                              | 986 kB     00:00    
-------------------------------------------------------------------------------------------------------------------------------
Total                                                                                          5.3 MB/s | 1.9 MB     00:00    
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing     : bind-libs                                                                                       1/4
  Installing     : bind                                                                                              2/4
  Installing     : caching-nameserver                                                                       3/4
  Installing     : bind-chroot                                                                                    4/4

Installed:
  bind.x86_64 30:9.3.6-4.P1.el5_4.2                   bind-chroot.x86_64 30:9.3.6-4.P1.el5_4.2
  bind-libs.i386 30:9.3.6-4.P1.el5_4.2                caching-nameserver.x86_64 30:9.3.6-4.P1.el5_4.2

Complete!




    1.2 심볼릭 링크 연결
ln -s /var/named/chroot/etc/named.caching-nameserver.conf



    1.3 named.caching-nameserver.conf 설정 변경
# vi /var/named/chroot/etc/named.caching-nameserver.conf
//
// named.caching-nameserver.conf
//
// Provided by Red Hat caching-nameserver package to configure the
// ISC BIND named(8) DNS server as a caching only nameserver
// (as a localhost DNS resolver only).
//
// See /usr/share/doc/bind*/sample/ for example named configuration files.
//
// DO NOT EDIT THIS FILE - use system-config-bind or an editor
// to create named.conf - edits to this file will be lost on
// caching-nameserver package upgrade.
//
options {
        listen-on port 53 { 127.0.0.1; };
        listen-on port 53 { 111.222.333.444; }; # Add

//      listen-on-v6 port 53 { ::1; };    # Comment
        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;         # Add
    allow-query     { any; };         # Add

        // Those options should be used carefully because they disable port
        // randomization
        // query-source    port 53;
        // query-source-v6 port 53;


    version "unknown";            # Add
    dnssec-enable yes;            # Add

//      allow-query     { localhost; };    # Comment

};
logging {
        channel default_debug {
                file "data/named.run";
                severity dynamic;
        };
    category lame-servers { null; };     # Add
    category notify { null; };        # Add
};
view localhost_resolver {
//      match-clients      { localhost; };  # Comment
//      match-destinations { localhost; };  # Comment
        recursion yes;
        include "/etc/named.rfc1912.zones";
};






   1.4 named.rfc1912.zones 설정 변경
# vi /var/named/chroot/etc/named.rfc1912.zones
// named.rfc1912.zones:
//
// Provided by Red Hat caching-nameserver package
//
// ISC BIND named zone configuration for zones recommended by
// RFC 1912 section 4.1 : localhost TLDs and address zones
//
// See /usr/share/doc/bind*/sample/ for example named configuration files.
//
zone "." IN {
        type hint;
        file "named.ca";
};

zone "localdomain" IN {
        type master;
        file "localdomain.zone";
        allow-update { none; };
};

zone "localhost" IN {
        type master;
        file "localhost.zone";
        allow-update { none; };
};

zone "0.0.127.in-addr.arpa" IN {
        type master;
        file "named.local";
        allow-update { none; };
};

zone "0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa" IN {
        type master;
        file "named.ip6.local";
        allow-update { none; };
};

zone "255.in-addr.arpa" IN {
        type master;
        file "named.broadcast";
        allow-update { none; };
};

zone "0.in-addr.arpa" IN {
        type master;
        file "named.zero";
        allow-update { none; };
};

zone "webpride.net" IN {
        type master;
        file "webpride.net.zone";
        allow-update { none; };
};

zone "tradefree.co.kr" IN {
        type master;
        file "tradefree.co.kr.zone";
        allow-update { none; };
};

zone "luckypark.co.kr" IN {
        type master;
        file "luckypark.co.kr.zone";
        allow-update { none; };
};

AOUCTIONB2B.COM
aouctionb2b.com

1.5 각각의 도메인에 대한 zone 파일 생성
# vi /var/named/chroot/var/named/webpride.net.zone
$TTL    0
@               IN SOA  ns.webpride.net.       webmaster.webpride.net. (
                                1               ; serial
                                3H              ; refresh
                                15M             ; retry
                                1W              ; expire
                                0 )            ; minimum(TTL)

                IN NS           ns.webpride.net.
                IN MX   10      mail.webpride.net.
@               IN A            220.76.204.194
www             IN A            220.76.204.194



# vi /var/named/chroot/var/named/tradefree.co.kr.zone
$TTL    0
@               IN SOA  ns.webpride.net.       webmaster.tradefree.co.kr. (
                                1               ; serial
                                3H              ; refresh
                                15M             ; retry
                                1W              ; expire
                                0 )            ; minimum(TTL)

                IN NS           ns.webpride.net.
                IN MX   10      mail.tradefree.co.kr.
@               IN A            220.76.204.194
www             IN A            220.76.204.194


# vi /var/named/chroot/var/named/luckypark.co.kr.zone
$TTL    0
@               IN SOA  ns.webpride.net.       webmaster.luckypark.co.kr. (
                                1               ; serial
                                3H              ; refresh
                                15M             ; retry
                                1W              ; expire
                                0 )            ; minimum(TTL)

                IN NS           ns.webpride.net.
                IN MX   10      mail.luckypark.co.kr.
@               IN A            220.76.204.194
www             IN A            220.76.204.194



1.6 네임서버 실행
# /etc/rc.d/init.d/named start

'서버' 카테고리의 다른 글

chkrootkit (루트킷 점검툴)  (0) 2014.01.01
CentOS 네트워크 설치  (0) 2014.01.01
CentOS setup ntsysv 설치  (0) 2014.01.01
Cannot start session without errors phpMyadmin-오류  (0) 2014.01.01
APM rpm으로 설치시 경로  (0) 2013.12.30
Posted by 주말소프트
,