#UPGRADE BINUTILS
   cd /files
   wget http://www.peregrinehw.com/downloads/bind/binutils-2.16.1.tar.bz2

   cd /usr/src
   tar jxvf /files/binutils-2.16.1.tar.bz2
   cd binutils-2.16.1/
   ./configure
   make -j3
   make install

   #NOTE: This leaves the original binutils intact and installs in /usr/local/ instead.  
   #      Edit /etc/profile to make sure /usr/local/bin is first in your path!

   #LOGOUT AND LOG BACK IN!


#UPGRADE OPENSSL
   cd /files
   wget http://www.peregrinehw.com/downloads/firewall/rh7.3/openssl-0.9.8t.tar.gz

   cd /usr/src
   tar zxvf /files/openssl-0.9.8t.tar.gz
   cd openssl-0.9.8t/
   ./config shared
   #-j Parallel Make NOT OK
   make 
   make test && make install

   #Update ldconfig so that the system can find the new shared library
   echo /usr/local/lib/ > /etc/ld.so.conf.d/local.conf
   echo /usr/local/ssl/lib/ >> /etc/ld.so.conf.d/local.conf

   ldconfig -v | grep ssl


#UPGRADE BIND
   cd /files
   wget http://www.peregrinehw.com/downloads/bind/bind-9.8.1-P1.tar.gz

   cd /usr/src
   tar zxvf /files/bind-9.8.1-P1.tar.gz 
   cd bind-9.8.1-P1/
 
   # Do not use a parallel "make".

   #TRYING WITHOUT SHARED & WITH GCC 3.2.3
   make distclean
   CC=/usr/local/gcc3.2.3/bin/gcc ./configure --enable-threads --with-libtool --prefix=/usr/local/bind --with-openssl=/usr/local/ssl 
   make
   make install


#BACKUP EXISTING CONFIG STUFF
  tar cvfz /root/named-backup.tar.gz /etc/logrotate.d/named /etc/rc.d/init.d/named /etc/rndc.conf /etc/sysconfig/named /var/named /var/run/named /etc/named.conf /etc/rndc.key

#REMOVE STOCK BIND
/etc/rc.d/init.d/named stop
rpm -e bind bind-utils caching-nameserver bindconf bind-devel

#CREATE A USER
/usr/sbin/adduser -c "BIND non-privileged user" -M -d /var/empty/named -s /sbin/nologin named -u 25

restore the logrotate, init script, sysconfig files
  cd /tmp/
  mkdir 1
  cd 1
  tar zxvf /root/named-backup.tar.gz

  mv etc/logrotate.d/named /etc/logrotate.d/
  mv etc/rc.d/init.d/named /etc/rc.d/init.d/
  mv etc/sysconfig/named /etc/sysconfig/

mkdir /var/run/named with perms drwxr-xr-x    2 named    named   

rmdir /usr/local/bind/var/run
ln -s /var/run/named /usr/local/bind/var/run

modify init script to reflect /usr/local/bind (:1,$s'/usr/sbin/rndc'/usr/local/bind/sbin/rndc'g && :1,$s'/usr/sbin/named'/usr/local/bind/sbin/named'g)

modify path to use /usr/local/bind/bin and /usr/local/bind/sbin

run chkconfig named on

restore rndc.key, rndc.conf and named.conf
  cd /tmp/1
  mv etc/rndc.key /etc/
  mv etc/rndc.conf /etc/
  mv etc/named.conf /etc/

Add this to your named.conf

	recursion yes;
        allow-recursion { any; };
        allow-query { any; };
        allow-query-cache { any; };

restore /var/named files

symlink /etc/rndc.conf, /etc/rndc.key and /etc/named.conf to /usr/local/bind/etc
  ln -s /etc/rndc.conf /usr/local/bind/etc/rndc.conf
  ln -s /etc/rndc.key /usr/local/bind/etc/rndc.key
  ln -s /etc/named.conf /usr/local/bind/etc/named.conf
