In LINUX, DNS configuration is the basis for setting up multiple servers. I believe many people start From configuring DNS, and most new users start from vmwarevm or LAN, at the beginning, I was crazy about surfing the internet to check some information. I had to pay a lot of money to complete the process. This article briefly describes the configuration process. The basic description of DNS is not mentioned here. If you need it, you can search for it on the Internet. Test environment, vmware5, RedHatas4, vmware
In LINUX, DNS configuration is the basis for setting up multiple servers. I believe many people start From configuring DNS to set up LINUX servers. Most new users start from VMware virtual machines or local area networks, at the beginning, I was crazy about surfing the internet to check some information. I had to pay a lot of money to complete the process. This article briefly describes the configuration process. The basic description of DNS is not mentioned here. If you need it, you can search for it on the Internet.
Test environment, vmware 5, RedHat as 4, vmware nat
1, # vi/etc/sysconfig/network; give the local host name,
NETWORKING = yes
HOSTNAME = mail.linuxidc.com/
2, # vi/etc/hosts; for local resolution, the host name and IP address of the local file can be written in to improve the resolution speed.
127.0.0.1 localhost. localdomain localhost
192.168.187.1 ftp.linuxidc.com/
192.168.187.128 mail.linuxidc.com/
192.168.187.129 www.linuxidc.com/
3. # vi/etc/host. conf; it is the resolution order. If the above hosts cannot be resolved, the DNS resolution will be completed.
Order hosts, bind
4. # vi/etc/named. conf; edit the main Configuration component of bind and add two zones.
.........
Zone "localhost" IN {
Type master;
File "localhost. zone ";
Allow-update {none ;};
};
Zone "0.0.127.in-addr. arpa" IN {
Type master;
File "named. local ";
Allow-update {none ;};
};
Zone "linuxidc.com/" IN {
Type master;
File "linuxidc.com/.zone ";
Allow-update {none ;};
};
Zone "187.168.192.in-addr. arpa" IN {
Type master;
File "192.168.187.zone ";
Allow-update {none ;};
};
The red text above is newly added, which is copied from local. zone. Press 5yy in vi and then p twice.
Cp is here,
5. # cd/var/named
# Cp localdomain. zone linuxidc.com/.zone
# Vi linuxidc.com/.zone; edit the forward resolution file with slight modifications, as shown below:
$ TTL 86400
@ In soa mail.linuxidc.com/. root.linuxidc.com /.(
42; serial (d. adams)
3 H; refresh
15 M; retry
1 W; expiry
1D); minimum
In ns mail.linuxidc.com /.
In mx 10 mail.linuxidc.com /.
Ftp in a 192.168.187.1
Mail in a 192.168.187.128
Www in a 192.168.187.129