免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1282 | 回复: 2
打印 上一主题 下一主题

[SCO UNIX] 请问怎么配置sco unix 5.05 的dns [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2004-11-01 08:34 |只看该作者 |倒序浏览
请问怎么配置sco unix 5.05 的dns

论坛徽章:
0
2 [报告]
发表于 2004-11-01 09:16 |只看该作者

请问怎么配置sco unix 5.05 的dns

编辑/etc/resolv.conf

论坛徽章:
0
3 [报告]
发表于 2004-11-01 10:12 |只看该作者

请问怎么配置sco unix 5.05 的dns

***Remember to backup or make a copy of the files you want to modify. Hope this may help you.***

Pointing OpenServer to your ISPs DNS server
Edit the file /etc/resolv.conf and make sure it contains the following lines:



nameserver dns_ipaddress

hostresorder local bind

search domain



The dns_ipaddress is the address of the DNS server provided by your ISP; there are usually two, so add another nameserver entry under the first.

Setting up a DNS server on Openserver 5.0.7
OpenServer includes example DNS files located in /etc/named.d. You can use these files as templates to create the files below.  (If you have SCO OpenServer 5.0.7 Update Pack 1 (or later) installed, you can use the h2n utility to simplify this task.)



When you see any of the following, replace them with your relevant information:



mars –the server name of the OpenServer machine

simpsons.com – the domain of the OpenServer machine.



In the example files below mars.simpsons.com is the OpenServer machine and pc1.simpsons.com is a workstation machine in the same network.



Log in to OpenServer as the root user and make a copy of the template files just in case with the following commands:



cd /etc

cp –r named.d named.safe

cp /etc/named.conf named.conf_safe

cd named.d



The following sample files illustrate how to set up DNS.



File – named.soa

Description – This file provides a header for each of the other DNS files.



@           IN SOA      mars.simpsons.com.      root (

                  199701141821     ; Serial

                  10800 ; Refresh

                  1800  ; Retry

                  3600000 ; Expire

                  86400 )     ; Minimum

            IN NS mars.simpsons.com.





File – named.hosts

Description – This file provides information for forward lookups (hostnames >; IP addresses).



$INCLUDE named.soa



localhost               IN   A     127.0.0.1

mars                    IN   A     192.168.1.2

pc1                     IN   A     192.168.1.3

simpsons.com.          IN   MX 0 mars.simpsons.com.





File – named.rev

Description – This file provides information for reverse lookups (IP addresses >; hostnames).



$INCLUDE named.soa



2           IN PTR mars.simpsons.com.

3           IN PTR pc1.simpsons.com.





File – named.local

Description – This file provides



$INCLUDE named.soa

1           IN PTR      localhost.



File – named.conf

Description – This file is the main DNS configuration file that the named daemon looks for in /etc. It tells named where to find the other DNS files.



options {

      directory "/etc/named.d";   // Tells named where DNS files are

};





zone "0.0.127.in-addr.arpa" in {

      type master;

      file "named.local";

};



zone "." {

      type hint;            // Looks after Internet lookups

      file "root.cache";

};



zone "simpsons.com" {

      type master;                // The internal Simpsons domain

      file "named.hosts";

};



zone "1.168.192.in-addr.arpa" {

      type master;                // Reverse zone for the 192.168.1 network

      file "named.rev";

};



Once you have modified the files to suit your server name and domain, run the following commands to complete the DNS server.



cd /etc/named.d

cp named.conf ..





Edit the file /etc/resolv.conf and make sure it contains the following lines (where domain is your domain):



nameserver 127.0.0.1

hostresorder local bind

search domain





Start the DNS service with the following command



/etc/ndc start





Test the DNS server with the following commands, remembering to change the IP address and names used to suit your setup.



nslookup ipaddress





You should get a response similar to the following:



Server:     localhost

Address: 127.0.0.1



Name:      mars.simpsons.com

Address:     192.168.1.2





Complete further nslookup tests for the following:



nslookup localhost

nslookup 127.0.0.1

nslookup ipaddress                 

nslookup www.sco.com



If you find you cannot resolve the last test to www.sco.com check to make sure you have the file root.cache in the /etc/named.d directory (it should be there by default).



After any change to the DNS configuration files, remember to restart the DNS:



/etc/ndc restart
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP