Today, in Ubuntu, I simply set up DNS and write down the process. I forgot to install OS first. I chose Ubuntu, which is the simplest to use, or Debian can be root @ netfs:/etc/bind # uname-aLinuxnetfs2.6.22-14-server #1SMPSunOct1423: 34: 23GMT2007i686GNU/Linux
Today, in Ubuntu, you can simply set up DNS and write down the process.
1 Installation
First of all, I chose the most simple Ubuntu or Debian.
Root @ netfs:/etc/bind # uname-
Linux netfs 2.6.22-14-server #1 SMP Sun Oct 14 23:34:23 GMT 2007 i686 GNU/Linux
Installation Process
Root @ netfs :~ # Apt-get install bind9
Reading package lists... Done
Building dependency tree
Reading state information... Done
Bind9 is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 15 not upgraded.
Root @ netfs :~ #
2. Settings
Set the primary dns and modify the/etc/bind/name. conf. local file.
Root @ netfs:/etc/bind # nano named. conf. local
Zone "apt-get.cn "{
Type master;
File "/etc/bind/apt-get.cn.hosts ";
};
Configure dns forwarding
Root @ netfs:/etc/bind # nano named. conf. options
Add the following paragraph to the front of the last section}. Do not add it to the back. After adding it to the back, your bind9 won't be able to start.
Forwarders {
202.103.0.117 port 53;
202.103.24.68 port 53;
};
Forward first;
Set Data Files
Root @ netfs:/etc/bind # nano apt-get.cn.hosts.
$ Ttl 38400 // default activity time
The apt-get.cn. in soa netfs. lcnja.qq.com .(
1199613019
10800 // refresh time
3600 // transmission retry time
604800 // expiration time
38400) // default activity time
Apt-get.cn. in ns netfs. // define a naming server note the following points cannot be lost // NS record nameserver
Web.apt-get.cn. in a 192.168.1.66 // define the name of an address record web.apt-get.cn. // A record address