MkLinux Name Server Installation Notes


Document Change History (check here to see what's different if you've visited this page before)

Contents

Introduction

This document describes how I installed the named name server on my MkLinux machine.

Another related document describes how to configure named once it's installed.

DNS (Domain Name Service) is a networking function that underlies many other services such as electronic mail and the World Wide Web. For example, the machines at the Primate Center comprise the primate.wisc.edu domain. Our name servers allow programs to determine the mapping between IP (Internet protocol) names and addresses. If you want to know the address of muriqui.primate.wisc.edu or the name that corresponds to the address 144.92.43.105, our name servers provide that information. They provide mail routing information, i.e., which of our hosts accept incoming mail. The domain information includes aliases. For instance, we advertise the name www.primate.wisc.edu for Web access, but there is no machine actually named that. The name is an alias for night.primate.wisc.edu, which acts as our primary Web server. That way, if Web service moves to another machine some day, we'll just change the alias to point to the new machine, and Web browsers won't need to know the difference.

Where to Get Information

Setting up name service isn't trivial, and, unless you already have some background on setting up and running name servers, you should do some reading to get that background. Some good sources of information are listed below:

Obtaining the BIND Software

The current release of the BIND software as I write is 4.9.4, but so far everyone seems to have problems getting it to compile properly under MkLinux. However, there is a Linux port of 4.9.3 that behaves much better. You can get it at the MkArchive; look in the comm directory. I'll assume that you're using the 4.9.3 distribution.

Building and Installing the Software

When you unpack the BIND 4.9.3 distribution, change directory into it and read the README.mklinux file. You'll notice it mentions that the distribution contains pre-built binaries under the OBJ directory. You can use them, or build the stuff for yourself easily; change directory into the bind-4.9.3-BETA17 directory and run make.

Once you have the binaries (whether you use the pre-built ones or compiled your own), you can install them. I would advise not using make install, since that won't necessarily put things where you want. I installed named in /usr/sbin; dig, dnsquery, host, and nslookup in /usr/local/bin; and the manual pages in directories under /usr/local/man. The table below shows which directories of the BIND distribution to look in to find various files.

File(s) Location under
OBJ
Location under
bind-4.9.3-BETA17
named usr/sbin named
dig,dnsquery,host usr/bin tools
nslookup not provided tools/nslookup
manual pages directories under
usr/man
man

Setting Up Name Server Startup and Shutdown

This section describes how to make sure named gets started when your system boots and stopped when it shuts down.

You can start the name server manually like this:

    # /usr/sbin/named

That's useful when you're testing the server, but once it's configured properly you'll want it to start up and shut down automatically. I do so as follows (assuming normal runlevel is 3). First, create a file named.init in the /etc/rc.d/init.d directory. Mine does stuff similar to what is done by other files in that directory. The text is shown below, or you can download it:

    #!/bin/sh

    # Source function library.
    . /etc/rc.d/init.d/functions

    # Source networking configuration.
    . /etc/sysconfig/network

    # Check that networking is up.
    [ ${NETWORKING} = "no" ] && exit 0

    # See how we were called.
    case "$1" in
      start)
    	echo -n "Starting name server: "
    	daemon named
    	echo
    	touch /var/lock/subsys/named
    	;;
      stop)
    	echo -n "Shutting down name server: "
    	killproc named
    	rm -f /var/lock/subsys/named
    	echo
    	;;
      *)
    	echo "Usage: named {start|stop}"
    	exit 1
    esac

Then arrange to have named.init invoked when multiuser mode (runlevel 3) begins and ends. The commands below make links to the named initialization script in the runlevel 3 startup directory and runlevel 6 shutdown directory:
    # cd /etc/rc.d/rc3.d
    # ln -s ../init.d/named.init S20named
    # cd /etc/rc.d/rc6.d
    # ln -s ../init.d/named.init K80named

Now your name server is ready to be configured and tested. If you already know how to configure a name server, do so. Otherwise, you should take a look at some of the references listed earlier in this document. You can also read the description of how I configured the name server for my own network.

Change History

9/30/96


Go to main MkLinux page
Document written by: Paul DuBois, paul@snake.net
Last updated: Saturday, 02 November 1996 16:29