Detailed resolution of RHEL5 DNS Configuration

Source: Internet
Author: User
Tags nslookup

RHEL5 is added on the basis of RHEL4. The system is also perfect, and RHEL5 has been applied to many people. Therefore, RHEL5 is required to be more powerful in configuration, the service configuration mainly involves the RHEL5 DNS configuration, so the following describes how to configure DNS in RHEL5:

1. Install RHEL5 DNS Configuration
After installation, you will find that the named. conf file cannot be found under/etc/. You need to create it manually !! Note that it is not created in the etc directory,
Echo>/var/named/chroot/var/etc/named. conf

Vi named. conf

Edit content:
Options
{
Directory "/var/named ";
};
Zone "."
{
Type hint;
File "named. ca ";
};

Save and exit!

Here we can see that the content is very simple, compared with the named in as4. the conf content is much less. options is used to describe the global attributes, where directory is set and a zone is added to the working directory of the specified server ". "The analysis file named pointing to a root domain. ca must generate a named. you can configure an available DNS for the ca file first.

2. RHEL5 DNS Configuration Creation content
Create a resolv. conf DNS resolution file with only nameserver 127.0.0.1
Echo "nameserver 127.0.0.1">/etc/resolv. conf
Then use the command to create named. ca
Dig-t NS.>/var/named/chroot/var/named. ca
Start Domain Name Service
Service named start

3. RHEL5 DNS configuration editing File
In this case, you can edit the above resolv. conf file, and then add other dns such:
Vi/etc/resolv. conf
Nameserver 127.0.0.1
Nameserver 202.103.24.68
Save and exit!
You can use host www.163.com to test whether DNS resolution can be performed.

4. RHEL5 DNS configuration completes file editing
Next, complete the named. conf file.
The Edit content is as follows:
Vi named. conf
Options
{
Directory "/var/named ";
};
Zone "."
{
Type hint;
File "named. ca ";
};
Zone "xxx.com"
{
Type master;
File "xxx.com. zone ";
};
Zone "1.168.192.in-addr. arpa"
{
Type master;
File "192.168.1.rev ";
};
Save and exit!
The editing is complete. You can see that you have added your domain name and added a forward/reverse resolution!

5. Add the corresponding file in RHEL5 DNS Configuration
Add the corresponding parsing File
/Var/named/chroot/var/named/xxx.com. zone and/var/named/chroot/var/named/192.168.1.rev
And edit the file:
Vi xxx.com. zone
@ In soa rhel5.com. root (
20060801
1 H
15 M
1 W
1D)
In ns ns
In mx 10 mail
Ns in a 192.168.1.159
Www in a 192.168.1.159
Mail in a 192.168.1.159
Save and exit !!!
Vi 192.168.1.rev
@ In soa rhel5.com. root (
20060801
1 H
15 M
1 W
1D)
In ns ns.xxx.com.
159 in ptr ns.xxx.com.
159 in ptr www.xxx.com.
159 in ptr mail.xxx.com.
Save and exit !!!
Note: Be sure to use Tab alignment!

After the configuration is complete, restart the named service:
Service named restart
Now let's test:
[Root @ rhel5/] # nslookup www.xxx.com
Server: 127.0.0.1
Address: 127.0.0.1 #53
Name: www.xxx.com
Address: 192.168.1.159
[Root @ rhel5/] # nslookup mail.xxx.com
Server: 127.0.0.1
Address: 127.0.0.1 #53
Name: mail.xxx.com
Address: 192.168.1.159
The resolution is successful !!!

RHEL5 DNS is a little more troublesome than RHEL4 DNS. Even if you select the DNS service when installing the system, you must install the bind RPM package after you normally enter the system, then install the RPM package of caching-nameserver. bind is installed by default. util package. I hope that the introduction to RHEL5 DNS configuration can help you.

  1. Analysis on RHEL5 Xen virtual management and Installation
  2. Simple projects supported by Linuxconf
  3. 5 Important Notes for remote RHEL5 Installation
  4. Steps for installing RHEL5
  5. Configure RHEL to bind multiple NICs

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.