Configure DNS in RHEL5

Source: Internet
Author: User
Configure DNS in RHEL5: My version is 5.3 Install bind-9.3.4-10.P1.el5.x86_64.rpmbind-chroot-9.3.4-10.P1.el5.x86_64.rpmbind-libs-9.3.4-10.P1.el5.i386.rpm these packages can be found on the RHEL installation disk 1. after installing the RHEL5DNS configuration, you will find that the named cannot be found under/etc. conf file, which

Configure DNS in RHEL5: My version is 5.3

Install bind-9.3.4-10.P1.el5.x86_64.rpm

Bind-chroot-9.3.4-10.P1.el5.x86_64.rpm

Bind-libs-9.3.4-10.P1.el5.i386.rpm

These packages can be found on the RHEL installation disk.

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/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.


Now, the local machine can use the dns Service normally.

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!

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.