Set up a DNS server full introduction

Source: Internet
Author: User
Tags bind mkdir domain name server
First download BIND from http://www.isc.org/products/BIND/(version 9.2.2) and untie the compressed package as follows.

TAR-XZVPF bind-9.2.2rc1.tar.gz

Then, change the directory to our extracted bind source directory:

CD BIND-9.2.2RC1

Next, Su becomes the root user.

We install bind to the "/usr/local/" directory. If you do not have the directory, create one:

Mkdir/usr/local

Bind uses autoconf, so compiling it is easy, as follows:

./configure--prefix=/usr/local--mandir=/usr/local/share/man

In about a few minutes, the files are configured. Then follow these steps:

Make

About 20 minutes, the compilation work can be completed. The rest of the work is to install (install). Follow these steps:

Make install

It also takes a few minutes.

When the installation is complete, bind is not immediately available because some of the configuration files are not configured. We'll take some simple configuration as an example.

In a standard installation, there is a named.conf file, a rndc.conf file, and a namedb directory that contains localhost.rev files. We install these to the "/usr/local/etc" directory. If the directory does not exist, create one first:

Mkdir/usr/local/etc

Again, we need to create a "namedb" directory:

Mkdir/var/namedb

Now, we edit the "named.conf" file. We can add more content later, but now it looks like this (we can download the named.conf file from here):

Options {

Directory "/var/namedb"; Working directory

Pid-file "Named.pid"; Put the PID file into the working directory, otherwise the PID file in the/var/run directory

};


Zone "." {
Type hint;

File "Named.root";

};

Provides reverse address mapping for loopback address 127.0.0.1

Zone "0.0.127.in-addr.arpa" {

Type master;

File "Localhost.rev";
Notify No;
};

Zone "173.76.207.in-addr.arpa" in {type Master; file "db.207.76.173"; notify no;};

Note that the above and the following forms of different examples actually accomplish the same function.

Zone "Bind.com" {

Type master;

File "Bind.com.zone";

Notify No;

};

Among them named.root (sometimes also called named.ca, refers to the same thing, everyone's habits are different) contains the current global top-level domain name server address information, the file may become obsolete over time, we need to regularly go online updates. Here is the free download of the InterNIC named.root, which is always up-to-date with information.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.