DekGenius.com
I l@ve RuBoard Previous Section Next Section

1.20 Stopping a Name Server

1.20.1 Problem

You want to stop a running name server.

1.20.2 Solution

Use ndc (for BIND 8 name servers) or rndc (for BIND 9 name servers):

# ndc stop

or:

# rndc stop

1.20.3 Discussion

ndc stop and rndc stop both tell the running name server to clean up and exit. "Cleaning up," in this age of dynamically updated zones, means writing the zone data files of any "dirty" zones to disk. ("Dirty" zones are zones that have been dynamically updated but not yet written to disk.)

Should you ever need to stop the name server without saving "dirty" zones to disk, BIND 9 offers the halt command:

# rndc halt

If you don't have ndc or rndc at your disposal (and you won't be able to use rndc until you've set up rndc.conf and a controls statement, as described in Section 3.3), you can still kill named with signals. With BIND 8, use SIGTERM:

# kill `cat /var/run/named.pid`

With BIND 9, you can use SIGTERM or SIGINT:

# kill -INT `cat /var/run/named.pid`

1.20.4 See Also

Recipes Section 3.2 and Section 3.3 for setting up ndc and rndc, respectively, and "Controlling the Name Server" in Chapter 7 of DNS and BIND.

    I l@ve RuBoard Previous Section Next Section