⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 350.html

📁 关于jsp的一些好文章 主要介绍一些关于JSP的应用技巧方面的东西
💻 HTML
字号:

<STYLE type=text/css>
<!--
body,td { font-size:9pt;}
hr { color: #000000; height: 1px}
-->
</STYLE>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<HTML>
<HEAD><TITLE>精选文章 >> solaris 专栏 >> 个 在Solaris下DNS配置的例子</title>
</head>
<body >

<p><IMG SRC="../image/jsp001_middle_logo.gif" WIDTH="180" HEIGHT="60" BORDER=0 ALT=""></p>

<table width=100% bgcolor="#cccccc" align=center cellpadding="2" cellspacing="0" border=1 bordercolorlight="#000000" bordercolordark="#FFFFFF">
<tr bgcolor="#EFF8FF"><td>
<a href=http://www.jsp001.com/list_thread.php?int_attribute=2>精选文章</a>
>> <a href=http://www.jsp001.com/list_thread.php?forumid=39&int_attribute=2>solaris 专栏</a>
>> 个 在Solaris下DNS配置的例子 [<a href=http://www.jsp001.com/forum/showthread.php?goto=newpost&threadid=350>查看别人的评论</a>]<br>

<hr><p>由 fei 发布于: 2001-02-12 11:00</p><p> </p><p>一个 在Solaris下DNS配置的例子<br>================================================================= <br><br>A. 我们的机器环境:<br><br>Solaris 8 sparc + Bind 8 (Solaris 8 附带) <br><br><br>B. IP规划:<br><br>domain: abc.com<br>DNS Server: solaris8.abc.com 132.254.254.76<br>网段: 132.254.254.xxx umask 255.255.255.0<br>客户机器: RedHat 6.2 u2.abc.com 132.254.254.120<br>SCO unxi5.0.5 sco.abc.com 132.254.254.92<br>HP-UX 11.0 punk.abc.com 132.254.254.7<br>win98 kun.abc.com 132.254.254.70<br>C.配置文件 <br><br>1.在Solaris8 上建立文件: (这个文件一般需要自己手工输入)<br><br>/etc/named.conf <br><br><br>//<br>// BIND Version 8 configuration file.<br>//<br><br>options {<br>directory "/etc/named.data"; //用户自己随便定义一个目录<br>dump-file "/etc/named.data/tmp/named_dump.db";<br>};<br><br>zone "abc.com" in {<br>type master;<br>file "db.abc.com";<br>};<br><br>zone "254.254.132.in-addr.arpa" in {<br>type master;<br>file "db.132.254.254";<br>};<br><br>zone "0.0.127.in-addr.arpa" in {<br>type master;<br>file "db.127.0.0";<br>};<br><br>zone "." in {<br>type hint;<br>file "db.cache";<br>};<br><br>//<br>//<br>// The following file contains real examples of how special BIND 8<br>// configurations can be created. These configurations will get<br>// appended to the /etc/named.conf file after all of the standard<br>// DNS entries are created. In most cases it will not be necessary<br>// to add anything here, but if it is necessary, here are a couple<br>// of examples.<br>//<br>// server 204.33.116.7 {<br>// transfers 2;<br>// };<br>//<br>// topology {<br>// 15/8;<br>// 172.88/16;<br>// };<br>//<br>// <br><br>2.Solaris8 上注意修改这个文件/etc/nsswitch.conf <br><br># You must also set up the /etc/resolv.conf file for DNS name<br># server lookup. See resolv.conf(4).<br>hosts: files dns #注意那个dns,必须有哦<br><br>3./etc/resolc.conf <br><br>nameserver 132.254.254.76 #你的DNS server ip<br>domain abc.com #默认的domain <br><br>4.编辑 /etc/named.data/127.0.0 <br><br>@ IN SOA ns.abc.com. ben.abc.com. ( 2000091311 10800 3600 604800 864<br>00 )<br>IN NS ns.abc.com.<br>IN NS u2.abc.com.<br>1 IN PTR localhost. <br><br>5.编辑 /etc/named.data/db.132.254.254 <br><br>254.254.132.in-addr.arpa. IN SOA ns.abc.com. ben.abc.com. (<br>2000091322<br>10800<br>3600<br>604800<br>86400 )<br>254.254.132.in-addr.arpa. IN NS ns.abc.com.<br>254.254.132.in-addr.arpa. IN NS u2.abc.com.<br>76.254.254.132.in-addr.arpa. IN PTR solaris8.abc.com.<br>70.254.254.132.in-addr.arpa. IN PTR kun.abc.com.<br>77.254.254.132.in-addr.arpa. IN PTR punk.abc.com. <br><br>6.编辑 /etc/named.data/db.abc.com <br><br>//From here....<br>abc.com.INSOA ns.abc.com. ben.abc.com. (<br>2000091328<br>10800<br>3600<br>604800<br>86400 )<br>madebyunxiaid IN TXT "This map made by unixaid.net" //一个optional,可以不要<br>abc.com. IN NS ns.abc.com.<br>abc.com. IN MX 20 solaris8.abc.com.<br>localhost IN A 127.0.0.1<br>solaris8.abc.com. IN A 132.254.254.76 <a href="http://www.abc.com./" target=_blank>http://www.abc.com./</a> IN CNAME solaris8.abc.com. //CNAME代表这个是一个机器solaris8.abc.com的别名<br>kun.abc.com. IN A 132.254.254.70<br>linux.abc.com. IN CNAME U2.abc.com.<br>ftp.abc.com. IN CNAME solaris8.abc.com.<br>mail.abc.com. IN CNAME solaris8.abc.com.<br>punk.abc.com. IN A 132.254.254.77<br>u2.abc.com. IN A 132.254.254.120 <br><br>7.编辑 /etc/named.data/db.cache <br><br>//From here.... <br><br>; This file holds the information on root name servers needed to<br>; initialize cache of Internet domain name servers<br>; (e.g. reference this file in the "cache . &lt;file&gt;"<br>; configuration file of BIND domain name servers).<br>;<br>; This file is made available by InterNIC registration services<br>; under anonymous FTP as<br>; file /domain/named.root<br>; on server FTP.RS.INTERNIC.NET<br>; -OR- under Gopher at RS.INTERNIC.NET<br>; under menu InterNIC Registration Services (NSI)<br>; submenu InterNIC Registration Archives<br>; file named.root<br>;<br>; last update: Aug 22, 1997<br>; related version of root zone: 1997082200<br>;<br>;<br>; formerly NS.INTERNIC.NET<br>;<br>. 3600000 IN NS A.ROOT-SERVERS.NET.<br>A.ROOT-SERVERS.NET. 3600000 A 198.41.0.4<br>;<br>; formerly NS1.ISI.EDU<br>;<br>. 3600000 NS B.ROOT-SERVERS.NET.<br>B.ROOT-SERVERS.NET. 3600000 A 128.9.0.107<br>;<br>; formerly C.PSI.NET<br>;<br>. 3600000 NS C.ROOT-SERVERS.NET.<br>C.ROOT-SERVERS.NET. 3600000 A 192.33.4.12<br>;<br>; formerly TERP.UMD.EDU<br>;<br>. 3600000 NS D.ROOT-SERVERS.NET.<br>D.ROOT-SERVERS.NET. 3600000 A 128.8.10.90<br>;<br>; formerly NS.NASA.GOV<br>;<br>. 3600000 NS E.ROOT-SERVERS.NET.<br>E.ROOT-SERVERS.NET. 3600000 A 192.203.230.10<br>;<br>; formerly NS.ISC.ORG<br>;<br>. 3600000 NS F.ROOT-SERVERS.NET.<br>F.ROOT-SERVERS.NET. 3600000 A 192.5.5.241<br>;<br>; formerly NS.NIC.DDN.MIL<br>;<br>. 3600000 NS G.ROOT-SERVERS.NET.<br>G.ROOT-SERVERS.NET. 3600000 A 192.112.36.4<br>;<br>; formerly AOS.ARL.ARMY.MIL<br>;<br>. 3600000 NS H.ROOT-SERVERS.NET.<br>H.ROOT-SERVERS.NET. 3600000 A 128.63.2.53<br>;<br>; formerly NIC.NORDU.NET<br>;<br>. 3600000 NS I.ROOT-SERVERS.NET.<br>I.ROOT-SERVERS.NET. 3600000 A 192.36.148.17<br>;<br>; temporarily housed at NSI (InterNIC)<br>;<br>. 3600000 NS J.ROOT-SERVERS.NET.<br>J.ROOT-SERVERS.NET. 3600000 A 198.41.0.10<br>;<br>; housed in LINX, operated by RIPE NCC<br>;<br>. 3600000 NS K.ROOT-SERVERS.NET.<br>K.ROOT-SERVERS.NET. 3600000 A 193.0.14.129<br>;<br>; temporarily housed at ISI (IANA)<br>;<br>. 3600000 NS L.ROOT-SERVERS.NET.<br>L.ROOT-SERVERS.NET. 3600000 A 198.32.64.12<br>;<br>; housed in Japan, operated by WIDE<br>;<br>. 3600000 NS M.ROOT-SERVERS.NET.<br>M.ROOT-SERVERS.NET. 3600000 A 202.12.27.33<br>; End of File <br><br>D.ok,现在reboot你的机器 <br><br>#init 6 <br><br>E.测试你的配置<br>$/usr/sbin/nslookup<br>Default Server: solaris8.abc.com<br>Address: 132.254.254.76 <br><br>&gt; u2<br>Server: solaris8.abc.com<br>Address: 132.254.254.76 <br><br>Name: u2.abc.com<br>Address: 132.254.254.120 <br><br>&gt; u2.abc.com<br>Server: solaris8.abc.com<br>Address: 132.254.254.76 <br><br>Name: u2.abc.com<br>Address: 132.254.254.120 <br><br>&gt;^D // Ctrl+D 退出nslookup<br>$ <br><br>F.客户机器上的设置: <br><br>1.RedHat 6.2 hostname: u2.abc.com<br>IP: 132.254.254.120 <br><br>编辑/etc/resolv.conf<br>nameserver 132.254.254.76<br>domain abc.com <br><br>然后测试一下:<br>bash$ nslookup<br>Default Server: solaris8.abc.com<br>Address: 132.254.254.76 <br><br>&gt; sco<br>Server: solaris8.abc.com<br>Address: 132.254.254.76 <br><br>Name: dns.hp9000.com<br>Address: 132.254.254.92<br>Aliases: sco.hp9000.com <br><br>&gt; punk<br>Server: solaris8.abc.com<br>Address: 132.254.254.76 <br><br>Name: punk.abc.com<br>Address: 132.254.254.77 <br><br>&gt;^D<br>bash$<br>2.win98 hostname: kun.abc.com<br>IP: 132.254.254.70 <br><br>tcp ip属性: <br><br>add DNS: 132.254.254.76<br>后缀: abc.com <br><br>reboot win9x <br><br>然后测试一下: <br><br>C:&gt;ping solaris8.abc.com <br><br><br>G.几个补充说明<br>1.doamin: abc.com是我们自己Lan内虚拟的,你其实可以任意命名他 <br><br>2.我们针对的是目前大家用的比较多的Bind 8.X版本,如果你的机器是:<br>SCO 505 and below<br>Solaris 2.6 and below<br>HP-UX 11.x and below<br>那么你的随机器带来的Bind 是4.X的,这个版本的named启动文件是/etc/named.boot,<br>关于他的设置与/etc/named.conf大同小异。 <br><br>3.不论你使用哪个发行版本的unix,DNS的设置与unix的关系并没有太大的关系 <br><br>4.目前在网络上有许多基于GUi/WEB的DNS设置软件,如果你感觉自己实在太差,可以使用<br>这些软件.<br><br>5.如果系统启动后,你可以在syslog文件中查看named的日志<br>Solaris下在/var/adm/messages: <br><br>......<br>Nov 1 17:35:44 solaris8 named[168]: [ID 295310 daemon.notice] starting. in.named BIND 8.1.2 Wed Dec 22 00:01:15 PST 1999<br>Nov 1 17:35:44 solaris8 named[200]: [ID 295310 daemon.notice] Ready to answer queries.<br>...... <br><br><br>每次你修改了/etc/named.conf文件,必须reboot named!!!<br>#ps -ef |grep named<br>root 200 1 0 17:35:44 ? 0:00 /usr/sbin/in.named<br>#kill -HUP 200 <br><br><br>------------------------------- <br><br>中文unix社区 <a href="http://www.unixaid.net/" target=_blank>http://www.unixaid.net/</a><br>============================<br>一个专业的unix技术交流社区 <br><br><br>作者: 斯汀 (eltonsting@yahoo.com)<br>本 (ben@unixaid.net) 首发<br>任何问题或者Bug,请及时联络作者.<br>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br>Copyright <a href="http://www.unixaid.net/" target=_blank>http://www.unixaid.net/</a> 2000/11/01<br>任何网站或者传统媒体转载,必须得到我们的授权!!!<br>否则我们保留追究相关法律责任的权利!!! <br><br><br><br><br>------------------<br>中国好酷网 <a href="http://www.haoku.net" target=_blank>http://www.haoku.net</a><br>========================<br>一个专注于unix技术的网站<br></p></td>
  </tr>
</table>

<p>
<CENTER><a href="http://www.jsp001.com/forum/newreply.php?action=newreply&threadid=350">点这里对该文章发表评论</a></CENTER>
<p>该文章总得分是 <font color=red>0</font> 分,你认为它对你有帮助吗?
				[<a href=javascript:void(0) onclick=window.open("http://www.jsp001.com/forum/codeVote.php?threadid=350&intVote=4","","menubar=no,toolbar=no,location=no,directories=no,status=no,resizable=no,scrollbars=no,width=70,height=40,top=0,left=0")>非常多</a>](<font color=red>0</font>) 
				[<a href=javascript:void(0) onclick=window.open("http://www.jsp001.com/forum/codeVote.php?threadid=350&intVote=2","","menubar=no,toolbar=no,location=no,directories=no,status=no,resizable=no,scrollbars=no,width=70,height=40,top=0,left=0")>有一些</a>](<font color=red>0</font>) 
				[<a href=javascript:void(0) onclick=window.open("http://www.jsp001.com/forum/codeVote.php?threadid=350&intVote=1","","menubar=no,toolbar=no,location=no,directories=no,status=no,resizable=no,scrollbars=no,width=70,height=40,top=0,left=0")>无帮助</a>](<font color=red>0</font>) 
				[<a href=javascript:void(0) onclick=window.open("http://www.jsp001.com/forum/codeVote.php?threadid=350&intVote=-1","","menubar=no,toolbar=no,location=no,directories=no,status=no,resizable=no,scrollbars=no,width=70,height=40,top=0,left=0")>是灌水</a>](<font color=red>0</font>) </p>
<script language="javascript" src="http://www.jsp001.com/include/read_thread_script.php?threadid=350"></script>
<p><CENTER>
Copyright &copy; 2001 - 2009 JSP001.com . All Rights Reserved <P>

<IMG SRC="../image/jsp001_small_logo.gif" WIDTH="85" HEIGHT="30" BORDER=0 ALT="">
</CENTER></p>

</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -