Article Title: Step by Step porting from Win2kDNS to Linux. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.
I. preparations: First, go to win2k, DNS Service Manager, and select View -- list;
Export the list to a file: mydomain.txt
Enter \ winnt \ system32 \ dns to pack all files and copy them with mydomain.txt to linux.
Ii. Start migration: 1. Generate the configuration file:
Master domain configuration file:
Run the following script:
Open (OUTFILE, ">>$ configfile ");
Flock (OUTFILE, 2 );
Print OUTFILE "options {\ n ";
Print OUTFILE "directory \" $ dnsfile \ "; \ n ";
Print OUTFILE "forwarders {\ n ";
Print OUTFILE "202.96.199.20.; \ n ";
Print OUTFILE "202.96.209.5; \ n ";
Print OUTFILE "};\ n ";
Print OUTFILE "};\ n ";
Print OUTFILE "zone \". \ "{\ n ";
Print OUTFILE "type hint; \ n ";
Print OUTFILE "file \" named. ca \ "; \ n ";
Print OUTFILE "};\ n ";
Open (INFILE, $ importfile );
@ Lines = ;
$ Num = 0;
Foreach $ line (@ lines ){
Chop ($ line );
Print OUTFILE "zone \" $ line \ "{\ n ";
Print OUTFILE "type master; \ n ";
Print OUTFILE "file \" $ line. dns \ "; \ n ";
Print OUTFILE "};\ n ";
$ Num ++;
}
Close (INFILE );
Close (OUTILE );
Print "$ num Record convert !! \ N ";
Exit;
Generate the backup domain configuration file: execute this script:
Open (OUTFILE, ">>$ configfile ");
Flock (OUTFILE, 2 );
Print OUTFILE "options {\ n ";
Print OUTFILE "directory \" $ dnsfile \ "; \ n ";
Print OUTFILE "forwarders {\ n ";
Print OUTFILE "202.96.199.20.; \ n ";
Print OUTFILE "202.96.209.5; \ n ";
Print OUTFILE "};\ n ";
Print OUTFILE "};\ n ";
Print OUTFILE "zone \". \ "{\ n ";
Print OUTFILE "type hint; \ n ";
Print OUTFILE "file \" named. ca \ "; \ n ";
Print OUTFILE "};\ n ";
Open (INFILE, $ importfile );
@ Lines = ;
$ Num = 0;
Foreach $ line (@ lines ){
Chop ($ line );
Print OUTFILE "zone \" $ line \ "{\ n ";
Print OUTFILE "type slave; \ n ";
Print OUTFILE "file \" $ line. dns \ "; \ n ";
Print OUTFILE "masters {$ masterns ;}; \ n ";
Print OUTFILE "};\ n ";
$ Num ++;
}
Close (INFILE );
Close (OUTILE );
Print "$ num Record convert !! \ N ";
Exit;
2. Copy DNS records: copy the copied dns files from windows to/var/named;
This operation is the same for the master and slave domains.
3. Run the following command in/var/named:
Mv CACHE. DNS named. ca # the configuration file windows and linux have different names.
Chown named: named * # change the owner
Chmod 644 * # Change permissions
5. Start the named service. /Etc/init. d/named start
6. Disable the original NS server.
7. Change the IP address of the linux server to a win2k IP address.
Now you can format the original NS server and install XP to play CS...
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.