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 .
Set FQDN of my Machine as below command
vi /etc/resolve.conf
Go to path and make changes accordingly our environment .
cd /var/named/chroot/etc/
This is Main Configuration file of DNS
My Linux OS -RHEL-6
My Machine IP -192.168.0.100
My Hostname - mylinux
My FQDN -mylinux.mydns.com
vi /etc/sysconfig/network-scripts/ifcfg-eth0
hostname mylinux.mydns.com
vi /etc/sysconfig/network
vi /etc/sysconfig/network
NETWORKING=yes
HOSTNAME=mylinux.mydns.com
vi /etc/hosts
192.168.0.100 mylinux.mydns.com mylinux
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 .
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.
Make file which will use for Forward Zone.
vi for.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 .
No comments:
Post a Comment