LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

Reply
 
Search this Thread
Old 05-26-2002, 08:52 PM   #1
360
Member
 
Registered: Jun 2001
Distribution: FC4
Posts: 136

Rep: Reputation: 15
How to Start Named - DNS Bind on boot-up.


continued from a different post on how to install and configure DNS Bind: http://www.linuxquestions.org/questi...threadid=21887


9. How to Start Named on boot-up.

We will run a script from /etc/init.d/named on boot-up using a soft link from
/etc/rc3.d/S55named or /etc/rc2.d/S55named,
depending on what your systems init default is.

To find out what your init default is, enter the command:
# vi /etc/inittab

Look for a line such as:
id:3:initdefault
Or
id:2:initdefault

I will use 3 but if yours is 2, change the number to 2 in the following.

You want named to start before such things as ssh and sendmail because
those deamons need DNS to run properly.
So to see what order my soft links are in , I could run the command:
# cd /etc/rc3.d ; ls

I might see that sendmail is S80sendmail so if ip use S55named then named
will start before sendmail because S55 comes before S80.

See if you have a file called /etc/init.d/named by typing the command:
# cd /etc/init.d ; ls

If you do have a filed call /etc/init.d/named, move it incase you need it by
entering the following comman:
# mv /etc/init.d/named /etc/init.d/named_old

Now create a file named /etc/init.d/named and put the following shell script in the file.

//--Begin Shell Script

#!/bin/sh
# Startup script for
#

if ! [ -x /usr/local/sbin/named ]; then
exit 0;
fi

if ! [ -f /etc/named.conf ]; then
exit 0;
fi

prog="named"

start() {
echo -n $"Starting $prog: "
/usr/local/sbin/named &
}

stop() {
echo -n $"Stopping $prog: "
/usr/local/sbin/rndc stop
}

case "$1" in
start)
start
;;

stop)
stop
;;

status)
/bin/ps -ef | grep na[Mm]ed
;;
restart)
stop
start
;;
*)
echo $"Usage: $0 {start|stop|restart|status}"
exit 1

esac

exit 0

// ---End Shell Script


To creat a soft link from /etc/rc3.d/S55 to the script in /etc/init.d/named,
enter the following command:
ln -s /etc/init.d/named /etc/rc3.d/S55named

restart your server.

Last edited by 360; 05-26-2002 at 08:58 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
BIND not loading named.ca Flawless Linux - Newbie 1 12-17-2004 11:29 AM
bind and named Red Squirrel Linux - Software 3 04-25-2004 09:49 PM
BIND problem... named will not even start. SniperDevil Linux - Networking 4 01-13-2004 04:43 PM
BIND / named r3ekon Linux - Newbie 6 10-16-2003 05:33 PM
Bind / named 80s Linux - Networking 3 03-20-2003 07:47 AM


All times are GMT -5. The time now is 11:46 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration