Again this section just DNS CONFIGURATION which Actually help you for 11g Release2 RAC configuration. Which I'll write very soon.
Step-1: Configure YUM first
Follow my previous article for YUM CONFIGURATION http://ashishdba.blogspot.in/2012/09/yum-configuration.html .
Step-2:
# yum install caching-nameserver*
# yum install bind*
Step-3: Copy named.conf file to the folder: /var/named/chroot/etc
(Note this named.conf file doesn't exist in your server, you'll find a file "named.caching-nameserver.conf" in the same location. Just copy the same file and rename with named.conf and do few changes, here is the sample file contents.
Remember in this file do the following changes
(a) in first section [ listen-on port 53 { 192.9.201.59; }; ]
(b) In the last just add following entry:
zone "example.com" IN {
type master;
file "forward.zone";
allow-transfer { 192.9.201.180; };
};
zone "201.9.192.in-addr.arpa" IN {
type master;
file "reverse.zone";
};
zone "0.0.10.in-addr.arpa" IN {
type master;
file "reverse1.zone";
};
----------------------------- named.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 { 192.9.201.59; };
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";
// Those options should be used carefully because they disable port
// randomization
// query-source port 53;
// query-source-v6 port 53;
allow-query { any; };
allow-query-cache { any; };
};
//logging {
// channel default_debug {
// file "data/named.run";
// severity dynamic;
// };
//};
//view localhost_resolver {
// match-clients { localhost; };
// match-destinations { localhost; };
// recursion yes;
// include "/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 "example.com" IN {
type master;
file "forward.zone";
allow-transfer { 192.9.201.180; };
};
zone "201.9.192.in-addr.arpa" IN {
type master;
file "reverse.zone";
};
zone "0.0.10.in-addr.arpa" IN {
type master;
file "reverse1.zone";
};
-----------------------------------------End of File --------------------------------------
Step-5: This command will change the ownership on named.conf file.
# chgrp named named.conf
Step-6: Then copy forward.zone, reverse.zone and reverse1.zone files to "/var/named/chroot/var/named" location
Step-7: This command will change the ownership on below files.
# chgrp named forward.zone
# chgrp named reverse.zone
# chgrp named reverse1.zone
Step-8: Now restart the named service so that we can use DNS Server. And the second command will start named service automatically whenever we'll restart our machine.
# service named restart
# chkconfig named on
Step-9: Now using dig command you can check whether you are getting reply from your DNS Server or not.
# dig server1.example.com
Thanks,
Step-1: Configure YUM first
Follow my previous article for YUM CONFIGURATION http://ashishdba.blogspot.in/2012/09/yum-configuration.html .
Step-2:
# yum install caching-nameserver*
# yum install bind*
Step-3: Copy named.conf file to the folder: /var/named/chroot/etc
(Note this named.conf file doesn't exist in your server, you'll find a file "named.caching-nameserver.conf" in the same location. Just copy the same file and rename with named.conf and do few changes, here is the sample file contents.
Remember in this file do the following changes
(a) in first section [ listen-on port 53 { 192.9.201.59; }; ]
(b) In the last just add following entry:
zone "example.com" IN {
type master;
file "forward.zone";
allow-transfer { 192.9.201.180; };
};
zone "201.9.192.in-addr.arpa" IN {
type master;
file "reverse.zone";
};
zone "0.0.10.in-addr.arpa" IN {
type master;
file "reverse1.zone";
};
----------------------------- named.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 { 192.9.201.59; };
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";
// Those options should be used carefully because they disable port
// randomization
// query-source port 53;
// query-source-v6 port 53;
allow-query { any; };
allow-query-cache { any; };
};
//logging {
// channel default_debug {
// file "data/named.run";
// severity dynamic;
// };
//};
//view localhost_resolver {
// match-clients { localhost; };
// match-destinations { localhost; };
// recursion yes;
// include "/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 "example.com" IN {
type master;
file "forward.zone";
allow-transfer { 192.9.201.180; };
};
zone "201.9.192.in-addr.arpa" IN {
type master;
file "reverse.zone";
};
zone "0.0.10.in-addr.arpa" IN {
type master;
file "reverse1.zone";
};
-----------------------------------------End of File --------------------------------------
Step-5: This command will change the ownership on named.conf file.
# chgrp named named.conf
Step-6: Then copy forward.zone, reverse.zone and reverse1.zone files to "/var/named/chroot/var/named" location
Step-7: This command will change the ownership on below files.
# chgrp named forward.zone
# chgrp named reverse.zone
# chgrp named reverse1.zone
Step-8: Now restart the named service so that we can use DNS Server. And the second command will start named service automatically whenever we'll restart our machine.
# service named restart
# chkconfig named on
Step-9: Now using dig command you can check whether you are getting reply from your DNS Server or not.
# dig server1.example.com
Thanks,
No comments:
Post a Comment