DNS Server Configuration On Linux Redhat 6

Hi Friends Today We learn How to configure DNS Server on RHEL-6, I fresh install RedHat-6 and yum is already configure on this machine so before starting this session see my current environment .

My Linux OS     -RHEL-6
My Machine IP  -192.168.0.100
My Hostname    - mylinux
My FQDN         -mylinux.mydns.com 

How DNS Works Scenario .


Hi See my Network Configuration File.
vi /etc/sysconfig/network-scripts/ifcfg-eth0


Set FQDN of my Machine as below command
hostname mylinux.mydns.com

vi /etc/sysconfig/network

NETWORKING=yes
HOSTNAME=mylinux.mydns.com

vi /etc/hosts
192.168.0.100  mylinux.mydns.com  mylinux

vi /etc/resolve.conf
search mylinux.mydns.com
nameserver 192.168.0.100
Now install bind RPM which is require for dns-named Service .
yum install bind*
copy default configuration file to given path .
cp /etc/named.conf /var/named/chroot/etc/named.conf

Go to path and make changes  accordingly our environment .

cd /var/named/chroot/etc/
This is Main Configuration file of DNS 
vi named.conf


chgrp named named.conf
cp /var/named/named.localhost /var/named/chroot/var/named/for.zone
cp /var/named/named.loopback /var/named/chroot/var/named/rev.zone

cd /var/named/chroot/var/named
Make file which will use for Forward Zone.
vi for.zone
Make File which will use for Reverse Zone .
vi rev.zone


chgrp named for.zone
chgrp named rev.zone
Restart DNS Service and set it as permanently On when server Power ON .
service named restart
chkconfig named on

To Check named server working or not it will show result similar as below Image .
dig 192.168.0.100

                                                     Done!!!!


Learn Other Servers:-  Apache                             LVM                                 YUM
                                                               







No comments:

Post a Comment