What we bring to you today is how to configure DNS Server 1 in the red hat Linux5.4 system. Configure the ip address of the server and the ip address of the client in the same network segment, after you direct the client's dns to the server ip address, clear the firewall rules and configure the ip Address: # system-config-network #/etc/init. d/networkrestart clear firewall rules: # What iptables & nbs bring to you today is how to configure the DNS server with a Red Hat Linux 5.4 System
1"ConfigurationIp
IpAnd clientIpIn the same network segmentDnsPoint to serverIp
ConfigureIpThen, clear the firewall rules first.
ConfigurationIp:
# System-config-network
#/Etc/init. d/network restart
Clear firewall rules:
# Iptables-F
Ensure that customers and servers can interact with each otherPingConnect
2"ConfigurationYumTools
Use a virtual machine to mount the disc. Select the image path of the disc.
# Mkdir-p/media/repo/RedHat
# Cd/media/repo/redhat
# Mount/dev/cdrom/meida/repo/redhatMount
# Cd ..
# Rpm-ivh/meida/repo/Server/createrepo-
EditYumMain configuration file
# Vi/etc/yum. conf
Gpgcheck = 0Disable Verification
Plagins = 1
[Local_cdrom]
Baseurl = file: // media/repo
Name = my local_cdrom
X:Save and exit
Createrepo-g/media/repo/redhat/Server/repodata/repomd. xml !)
ConfiguredYumIt is very convenient to install the software after the tool.
3Install and configureDNSRequired Toolkit
# Yum install bind *-y
# Yum install caching-name *-y (13Server address)
4Modify the configuration file
# Vi/etc/named. caching
# Vi/etc/named. rfc
Copy the following two paragraphs. One is forward and the other is reverse.
Change these two paragraphs:
In this step, you can check whether the two files are correctly written:
5In this promptNamed. caching File
Directory "/var/named"Because there areBind-chroot *This component package,
So the actual directory should be"/Var/named/chroot/var/named /".
So the next step should be like this:
# Cp/var/named/localhost. zone/var/named/chroot/var/named/abc.com. zone
# Cp/var/named. local/var/named/chroot/var/named/abc.com
6Modify these two files:
# Cd/var/named/chroot/var/named
# Vi abc.com. zone
# Vi abc.com
Then:
# Vi/etc/resolv. conf
7This is also a permission issue./Var/named/var/chroot/var/named
View permissions:
# Ll-Z
We can see that his user permissions areRootAll. Here we must grant the user permission of this fileNamedUser
# Chown root: named abc.com. zone
# Chown root: named abc.com
Here we are looking:
8Start the service:
/Etc/init. d/named start
Restart the service:
/Etc/init. d/named restart
Reload:
/Etc/init. d/named reload
Note: When the server is working, you can change the configuration file. Remember not to restart the server. This will suspend the service, but not reload the server.
The last key command indicates loading at startup:
# Checkconfig named on
9Test:
# Nslookup
>
After entering the interaction:
Call: www.abc.com will parse192.168.0.1