DNS Server configuration on Solaris/Linux/Unix system

mkdir -p/usr/local/bind-9.8.1-P1/var/named
mkdir -p /usr/local/bind-9.8.1-P1/var/cache
mkdir /usr/local/bind-9.8.1-P1/var/run/named
chown bind:bind /usr/local/bind-9.8.1-P1/var/run/named/
chmod g+w /usr/local/bind-9.8.1-P1/var/run/named/
chmod g+w /usr/local/bind-9.8.1-P1/var/cache
chmod g+w /usr/local/bind-9.8.1-P1/var/named
cd /usr/local/
ln -s bind-9.8.1-P1/ bind
adduser —home /usr/local/bind/var/named —shell /bin/bash —disabled-password—disabled-login bind
cp /home/usuario/.bashrc /usr/local/bind/var/named/
cp /home/usuario/.profile /usr/local/bind/var/named/
chown -R bind:bind /usr/local/bind/var/named/
adduser bind staff
chgrp staff /usr/local/src
chmod g+w /usr/local/src
su - bind
cd /usr/local/src/
wget http://ftp.isc.org/isc/bind9/9.8.1-P1/bind-9.8.1-P1.tar.gz
tar -xzf bind-9.8.1-P1.tar.gz
cd bind-9.8.1-P1.tar.gz

./configure—prefix=/usr/local/bind-9.8.1-P1 —sysconfdir=/usr/local/bind-9.8.1-P1/etc—enable-threads —with-libtool > configure.out
less configure.out
make > make.out
less make.out
make install > make-install.out
usermod—shell /bin/false bind
chown -R root:bind bind
chmod o-rwx bind
cd bind
chmod g+r etc/rndc.key
Find thefiles where the paths need correction:
find . -type f |xargs grep "etc/bind"|awk '{print $1}'|uniq
Changethe old path /etc/bind to /usr/local/bind/etc:
find . -type f |xargs grep -l "/etc/bind"|while read file; do sed's/etc\/bind/usr\/local\/bind\/etc/g' "$file" > tmp && mvtmp "$file"; done
Changethe cache directory in named.conf.options from /var/cache/bind to/usr/local/bind/var/cache:
directory "/usr/local/bind/var/cache";
vi named.conf.local
vi named.conf.options

Popular posts from this blog

Password Expiry notification for the users in zimbra 8.x within 7 Days for the email users

Zimbra backup open source for zimbra 8.x for 7 Days