Rhce dns configuration details this article uses RedHatEnterpriseLinuxASv4 as the platform and configuration in chroot mode, other versions are slightly different ************************************ * ************* 1. Configuration File 1. redHatEnterpriseLinux disc (first, four) 2. /v
Rhce dns configuration details
This article uses Red Hat Enterprise Linux AS v4 AS a platform,
Configuration in chroot mode, other versions are slightly different ************************************ **************
1. required configuration file
1. Red Hat Enterprise Linux Cd (first and fourth)
2./var/named/chroot/etc/named. conf // DNS master configuration file, no configuration required
3./etc/host. conf // The Conversion Program Control file, which does not need to be configured.
4./etc/resolv. conf // Conversion Program configuration file, which must be configured in the system
5./var/named/chroot/var/named. ca // The Root Domain Name Server points to the file without Configuration
6./var/named/chroot/var/named/localhost. zone localhost // forward zone file, which exists by default and does not need to be configured
7./var/named/chroot/var/named. local localhost // reverse zone file, which exists by default and does not require Configuration
8./var/named/chroot/var/named/Linuxidc. zone // The forward zone file configured by the user. The file does not exist by default and needs to be created and configured by the user.
9./var/named/chroot/var/named/0.168.192.zone // The Reverse zone file configured by the user. It does not exist by default and needs to be created and configured by yourself.
Ii. Detailed configuration process
1. Install DNS
# Rpm-qa | grep bind // check whether bind is installed
# Mount/media/cdrom // mount the fourth Disk
# Cd/media/cdrom/RedHat/RPMS // enter the cd directory
# Rpm-ivh bind-9.2.4-16.EL4.i386.rmp // install the required RPM package, master package
# Rpm-ivh bind-chroot-9.2.4-16.EL4.i386.rmp // install the required RPM package, which is used to change the ZONE file path based on security considerations
# Rpm-ivh bind-devel-9.2.4-16.EL4.i386.rmp // install required RPM packages, Development Kits
# Cd; eject // The disc is displayed.
# Mount/media/cdrom // mount the first disc
# Cd/media/cdrom/RedHat/RPMS // enter the cd directory
# Rpm-ivh caching-nameserver-7.3-3.noarch.rpm // install the desired RPM package
# Cd; eject // The disc is displayed.
2. Configure the Primary Domain Name Server Linuxidc.com
A./var/named/chroot/etc/named. conf // The main configuration file of DNS. Set the general named parameter and information source. The operation on this file is to add A region. Add a partition declaration to the main configuration file.
# Vi/var/named/chroot/etc/named. conf // The content is as follows:
Options {// define global configuration options
Directory "/var/named"; // defines the working directory of the server configuration file
Dump-file "/var/named/data/cache_dump.db ";
Statistics-file "/var/named/data/named_stats.txt ";
};
Controls {// define the control channel used by the rndc command. rndc is the control user program of the bind9 server.
Inet 127.0.0.1 allow {localhost;} keys {rndckey ;};
};
Zone "." IN {// indicates that this section defines the root (.) region.
Type hint; // specify the type as hint. When starting, initialize the cache Domain Name Server.
File "named. ca" // the root file that contains the region
};
Zone "localdomain" IN {
Type master;
File "localdomain. zone ";
Allow-updata {none ;};
};
Zone "localhost" IN {// defines the forward resolution region of localhost
Type master; // specifies the master, that is, the master Domain Name Server.
File "locahost. zone"; // The file containing this region is locahost. zone.
Allow-updata {none ;};
};
Zone "0.0.127.in-addr. arpa" IN {// defines the reverse resolution region of localhost.
Type master; // specifies the master, that is, the master Domain Name Server.
File "named. local"; // The file that contains the region is named. local.
Allow-updata {none ;};
};
Zone "Linuxidc.com" IN {// defines the forward resolution area of Linuxidc.com
Type master; // specifies the master, that is, the master Domain Name Server.
File "Linuxidc. zone"; // The file that contains the region is Linuxidc. zone.
Allow-updata {none ;};
};
Zone "0.168.192.in-addr. arpa" IN {// defines the reverse region of Linuxidc.com
Type master; // specifies the master, that is, the master Domain Name Server.
File "0.168.192.zone"; // The file that contains this region is 0.168.192.zone.
Allow-updata {none ;};
};
Include "/etc/rndc. key"; // contains the file
B. Create a database file for forward (reverse) Resolution
# Cd/var/namd/chroot/var/named // enter the Directory
# Cp localhost. zone Linuxidc. zone // create a database file for forward resolution Linuxidc. zone
# Cp named. local 0.168.192.zone // create a database file for reverse resolution 0.168.192.zone