Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

The configuration steps of DNS under RedHat Linux AS 5.3-lay the groundwork for learning Oracle network management

2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Network Security >

Share

Shulou(Shulou.com)06/01 Report--

There are many differences between the configuration of DNS under RedHat Linux AS 5.3 and that of RedHat Linux AS 4.5. Here I take a note of the DNS configuration steps under RedHat Linux AS 5.3, as follows:

First, check the BIND package, missing bind and bind-chroot packages

Second, use YUM source to install bind package

1. Equipped with YUM source

[root@mydb ~] # mount / dev/cdrom / mnt

Mount: block device / dev/cdrom is write-protected, mounting read-only

[root@mydb ~] # vi/etc/yum.repos.d/update.repo

[update] name=updatebaseurl= file:///mnt/Servergpgcheck=0enabled = 1

2. Install the bind package

[root@mydb ~] # yum list

[root@mydb~] # yum install bind

Loaded plugins: rhnplugin SecurityThis system is not registered with RHN.RHN support will be disabled.Setting up Install ProcessParsing package install argumentsResolving Dependencies-- > Running transaction check--- > Package bind.x86_64 30 Package bind.x86_64 9.3.4-10.P1.el5 set to be updated-- > Finished Dependency ResolutionDependencies Resolved= Package Arch Version Repository Size=Installing: bind x86 _ 64 30 kTransaction Summary=Install 9.3.4-10.P1.el5 update 961 kTransaction Summary=Install 1 Package (s) Update 0 Package (s) Remove 0 Package (s) Total download size: 961 kIs this ok [y yDownloading Packages:Running rpm_check_debugRunning Transaction TestFinished Transaction TestTransaction Test SucceededRunning Transaction Installing N]: yDownloading Packages:Running rpm_check_debugRunning Transaction TestFinished Transaction TestTransaction Test SucceededRunning Transaction Installing: bind [1Action1] Installed: bind.x86_64 30 10.P1.el5Complete 9.3.4!

[root@mydb~] # yum install bind-chroot

Loaded plugins: rhnplugin SecurityThis system is not registered with RHN.RHN support will be disabled.Setting up Install ProcessParsing package install argumentsResolving Dependencies-- > Running transaction check--- > Package bind-chroot.x86_64 30 10.P1.el5 set to be updated-- 9.3.4-10.P1.el5 set to be updated-- > Finished Dependency ResolutionDependencies Resolved= Package Arch Version Repository Size=Installing: bind-chroot X86'64 30 Package 9.3.4-10.P1.el5 update 42 kTransaction Summary=Install 1 Package (s) Update 0 Package (s) Remove 0 Package (s) Total download size: 42 kIs this ok [y yDownloading Packages:Running rpm_check_debugRunning Transaction TestFinished Transaction TestTransaction Test SucceededRunning Transaction Installing N]: yDownloading Packages:Running rpm_check_debugRunning Transaction TestFinished Transaction TestTransaction Test SucceededRunning Transaction Installing: bind -chroot [1bat 1] Installed: bind-chroot.x86_64 30 Vera 9.3.4-10.P1.el5Complete!

3. Check the installed BIND package, Ok!

[root@mydb ~] # service named status

Rndc: connect failed: 127.0.0.1#953: connection refused

Named is stopped

Indicates that the DNS is not configured, and then start to configure the DNS.

3. Configure DNS

1. Install caching-nameserver

[root@mydb~] # yum install caching-nameserver

Loaded plugins: rhnplugin SecurityThis system is not registered with RHN.RHN support will be disabled.Setting up Install ProcessParsing package install argumentsResolving Dependencies-- > Running transaction check--- > Package caching-nameserver.x86_64 30 10.P1.el5 set to be updated-- 9.3.4-10.P1.el5 set to be updated-- > Finished Dependency ResolutionDependencies Resolved= Package Arch Version Repository Size=Installing: caching-nameserver X86'64 30 Package 9.3.4-10.P1.el5 base 58 kTransaction Summary=Install 1 Package (s) Update 0 Package (s) Remove 0 Package (s) Total download size: 58 kIs this ok [y yDownloading Packages:Running rpm_check_debugRunning Transaction TestFinished Transaction TestTransaction Test SucceededRunning Transaction Installing N]: yDownloading Packages:Running rpm_check_debugRunning Transaction TestFinished Transaction TestTransaction Test SucceededRunning Transaction Installing: caching-nameserver [1Action1] Installed: caching-nameserver.x86_64 30 10.P1.el5Complete 9.3.4!

2. After the installation is completed, named.caching-nameserver.conf will be generated under / etc/. Check its contents as follows:

[root@mydb~] # cat / etc/named.caching-nameserver.conf

/ named.caching-nameserver.conf//// Provided by Red Hat caching-nameserver package to configure the// ISC BIND named (8) DNS server as a caching only nameserver / / (as a localhost DNS resolver only). / See / usr/share/doc/bind*/sample/ for example named configuration files.//// DO NOT EDIT THIS FILE-use system-config-bind or an editor// to create named.conf-edits to this file will be lost on / / caching-nameserver package upgrade.//options {listen-on port 53 {127.0.0.1;}; 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"; / / Those options should be used carefully because they disable port / / randomization / / query-source port 53; / / query-source-v6 port 53 Allow-query {localhost;};}; logging {channel default_debug {file "data/named.run"; severity dynamic;};}; view localhost_resolver {match-clients {localhost;}; match-destinations {localhost;}; recursion yes; include "/ etc/named.rfc1912.zones";}

3. Copy / etc/named.caching-nameserver.conf to / var/named/chroot/etc/named.conf

[root@mydb ~] # cp / etc/named.caching-nameserver.conf / var/named/chroot/etc/named.conf

4. Edit / var/named/chroot/etc/named.conf

[root@mydb ~] # vi/var/named/chroot/etc/named.conf

Options {listen-on port 53 {0.0.0.0;}; 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" / / Those options should be used carefully because they disable port / / randomization / / query-source port 53; / / query-source-v6 port 53; allow-query {any;}; / / allow-query-cache {any;};} logging {channel default_debug {file "data/named.run"; severity dynamic;} }; # view localhost_resolver {# match-clients {localhost;}; # match-destinations {localhost;}; # recursion yes;# include "/ etc/named.rfc1912.zones"; #}; # #-add the following paragraph zone "example.com." {type master; file "example.file";}

5. Modify named.conf permissions

[root@mydb~] # cd / var/named/chroot/etc/

[root@mydbetc] # ll

Total 20

-rw-r--r--1 root root 405 Sep 26 22:10 localtime

-rw-r-1 root named 1195 Jan 6 2009 named.caching-nameserver.conf

-rw-r-1 root root 1371 Nov 27 10:19 named.conf

-rw-r-1 root named 955 Jan 6 2009named.rfc1912.zones

-rw-r-1 root named 113 Nov 27 09:53 rndc.key

[root@mydbetc] # chown .named named.conf

[root@mydbetc] # ll

Total 20

-rw-r--r--1 root root 405 Sep 26 22:10 localtime

-rw-r-1 root named 1195 Jan 6 2009 named.caching-nameserver.conf

-rw-r-1 root named 1371 Nov 27 10:19 named.conf

-rw-r-1 root named 955 Jan 6 2009named.rfc1912.zones

-rw-r- 1 root named 113 Nov 27 09:53 rndc.key

6. Match the domain name

Root@mydbnamed] # pwd

/ var/named/chroot/var/named

[root@mydbnamed] # ls-l

Total 36

Drwxrwx---2 named named 4096 Aug 26 2004 data

-rw-r-1 root named 198 Jan 6 2009 localdomain.zone

-rw-r-1 root named 195 Jan 6 2009 localhost.zone

-rw-r-1 root named 427 Jan 6 2009 named.broadcast

-rw-r-1 root named 1892 Jan 6 2009named.ca

-rw-r-1 root named 424 Jan 6 2009 named.ip6.local

-rw-r-1 root named 426 Jan 6 2009 named.local

-rw-r-1 root named 427 Jan 6 2009 named.zero

Drwxrwx--- 2 named named 4096 Jul 27 2004 slaves

[root@mydb named] # cplocaldomain.zone example.file

7. Edit example.file

[root@mydb named] # vi / var/named/chroot/var/named/example.file

$TTL 86400 @ IN SOA guoyjoe.example.com. Root (42; serial (d. Adams) 3H; refresh 15m; retry 1W Expiry 1D); minimum IN NS guoyjoe.example.comguoyjoe IN A 192.168.153.129mydb IN A 192.168.153.129

Start the DNS service

[root@mydbnamed] # service named restart

Stoppingnamed: [OK]

Starting named: [OK]

5. DNS assignment of the client

[root@mydb ~] # more / etc/resolv.conf

; generated by / sbin/dhclient-script

Search localdomain

Nameserver 192.168.153.129

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Network Security

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report