Linux-DNS server configuration and management (I)

Source: Internet
Author: User
Tags to domain
Article Title: Linux-DNS server configuration and management (I ). Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.

DNS server configuration and management
****************
First, you need to know the following files related to domain name resolution.
/Etc/hosts -- the host name resolution method in the early stage (before DNS). Generally, there are three fields: IP address, full host domain name, And alias.
/Etc/resolv. conf -- specify the parameters of the DNS server used on the DNS Client.
/Etc/nsswitch-this file is used to define the search sequence of network databases, such as the host name, user password, network protocol, and other network parameters.
/Etc/host. conf -- the parser configuration file, which is used to specify the method for parsing the database. There is usually a command. The keyword order is used to specify the query order of the host.
****************
DNS server type
1. master server)
The Primary Domain Name Server is the source of all information in a specific domain. It loads domain information from the local disk file created by the Administrator. To configure the Primary Domain Name Server, You need to configure a complete set
Configuration files, including the master configuration file, forward domain file, Reverse Domain file, cache file, and reverse parsing file on the local host.
Note: A domain can have only one primary domain name server, but sometimes one or more secondary domain name servers can be created to break down domain name resolution tasks.
2. Secondary Domain Name server (slave server)
It is a backup of the work of the primary domain name, also known as the backup of the Domain Name Server, with the majority of the features of the primary server, for the secondary Domain Name Server only need to configure the primary configuration file, Cache
File and local anti-resolution file without configuring the regional file, because the regional file can be transferred from the Primary Domain Name Server and stored on the local hard disk of the secondary Domain Name Server.
3. cache Domain Name server (caching only server)
The cache Domain Name Server records the query results sent from the remote server to the Domain Name Server, and then stores the results in the cache for future query of the same information. Because the cache
The server does not manage any domains. Therefore, you only need to cache files when configuring the cache server.
4. Forwarding server)
The forwarding server can send DNS requests to servers outside the network, which can hide other servers on the LAN from the internet.
****************
BIND installation and startup
BIND is a software package for implementing DNS servers in linux. Almost all linux releases contain BIND.
I. BIND Installation
There are two ways to install BIND in linux: one is to select the DNS software in the system installation phase, and the other is to install the BIND Software Package separately after the system installation is complete.
Run the following command to check whether DNS is installed: # rpm-qa | grep bind
If BIND is not installed in the system, follow these steps to install BIND:
① First mount the installation disk
# Mount/dev/cdrom
# Cd/media/cdrom/CentOS/RPMS (this is the package directory of CentOS4)
# Cd/mnt/cdrom/RedHat/RPMS (this is the package directory of RedHat9)
Find the following rpm package from the first disk:
Caching-nameserver-7.3-3.noarch.rpm
Find the following rpm package from the second and fourth disks:
Bind-libs-9.2.4-2.i386.rpm
Bind-utils-9.2.4-2.i386.rpm
Bind-9.2.4-2.i386.rpm
Bind-chroot-9.2.4-2.i386.rpm
Bind-devel-9.2.4-2.i386.rpm
(Of course, the current version number shall prevail)
② Copy the software package to a system directory (such as/root) and install it in the system using the following command:
# Rpm-ivh bind *. rpm
# Rpm caching-server *. rpm
****************
DNS startup
1. Implementation in graphic mode: "application"-"system settings"-"Server Settings"-"service"
Select the named option in the service configuration window to start, close, and restart the named service.
2. Implement the following in the command line:
① Use the command #/etc/rc./init. d/named {start | stop | restart | status}
② The command # service named {start | stop | restart | status} can also be used}
(In fact, the internal implementation mechanism of the service script is to call the corresponding scripts in the/etc/rc. d/init. d directory, so the two commands are actually the same)
****************
DNS server configuration file

Related Article

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.