Rhel5 build secondary DNS

Source: Internet
Author: User
To create a DNS, first make sure that we have installed bind and caching-nameserver. caching-nameserver contains most of the bind configuration files. So I suggest you install it. First, create the primary DNS. First install. Rpm-ivhbind-9.3.3-7.el5.i386.rp build DNS first we need to determine that we have installed bind and caching-nameserver, caching-nameserver contains most of the bind configuration files. So I suggest you install it.
First, create the primary DNS. First install.
Rpm-ivh bind-9.3.3-7.el5.i386.rpm caching-nameserver-9.3.3-7.el5.i386.rpm
DNS has two major configuration files.
/Etc/named. caching-nameserver.conf and/etc/named. rfc1912.zones
1. First we configure/etc/named. caching-nameserver.conf
 
[Root @ localhost Server] # vim/etc/named. caching-nameserver.conf
// Caching-nameserver package upgrade.
//
Options {
// Listen-on port 53 {127.0.0.1;}; // comment out these parts; otherwise, the service cannot be provided externally.
Listen-on-v6 port 53 {: 1 ;};
Directory "/var/named ";
Dump-file "/var/named/data/cache_dump.db ";
Statistics-file "/var/named/data/named_stats.txt ";
Memstatistics-file "/var/named/data/named_mem_stats.txt ";
Query-source port 53;
Query-source-v6 port 53;
// Allow-query {localhost;}; // comment out these items; otherwise, the service cannot be provided externally.
};
Logging {
Channel default_debug {
File "data/named. run ";
Severity dynamic;
};
};
View localhost_resolver {
// Match-clients {localhost;}; // comment out these parts; otherwise, the service cannot be provided externally.
// Match-destinations {localhost;}; // comment out these places; otherwise, the service cannot be provided externally.
Recursion yes;
"/Etc/named. caching-nameserver.conf" 36L, 1108C 34,2-9 84%
 
2. Add our region at the bottom of the configuration file/etc/named. rfc1912.zones.
 
Zone "aaa.com" IN {
Type master;
File "aaa.com ";
};
3. Create the aaa.com content in/var/named/
 
 
@ In soa ns.aaa.com. asd.asd.com .(
42; serial (d. adams)
3 H; refresh
15 M; retry
1 W; expiry
1D); minimum
In ns ns.aaa.com.
Ns in a 192.168.1.8
Www in a 192.168.1.1
In ns ns1.aaa.com.; here we must specify the Auxiliary
Ns1 in a 192.168.1.1; DNS address.
Then we start DNS
[Root @ localhost ~] # Service named restart
Then we configure the secondary DNS server.
The first step of configuration is the same, both are modifying/etc/named. caching-nameserver.conf
Then we configure/etc/named. rfc1912.zones
Add our region at the end of the configuration file
Zone "aaa.com" IN {
Type slave;
File "slaves/aaa.com"; the write permission is required for Region replication.
Masters {192.168.1.8 ;}; primary DNS address
};
If you like to use the named directory, change the permission of the named directory to 770.
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.