Linux 版 (精华区)
发信人: netiscpu (说不如做), 信区: Unix
标 题: [M] DNS alias
发信站: 紫 丁 香 (Sun May 17 19:06:41 1998), 转信
本文整理自Linux-admin Mailling-list
[问题] 如何做 DNS alias
How to setup the DNS so that www.myhost.com is same as myhost.com ?
which file to edit ?
--- ---
-_- -_-
**~* **~*
F /-/ LangZhi UPM <langzhi@students.ml.org> /-/F
R /-/ whois ? Chan Kien Eng <b41548@kosass.upm.edu.my> /-/ R
E/-/"Software is like sex,its better when its free - Linus Torvalds"/-/ E
E - - - ^ When do you wanna cra$h today ?? ^ - - - E
[回答1]
Look at your /etc/named.boot file. One of the lines should
read something like:
directory /var/named
Make a note of the directory "/var/named" (or whatever it happens to
be for you.) Now look further down the file for a line that
is similar to:
primary myhost.com myhost.hosts
Given this information, we now go edit /var/named/myhost.hosts
(do the appropriate filename substituion). Inside that file
you'll see a line that will look something like:
myhost.com. IN A 192.168.42.10
Right below it, add the line:
www.myhost.com. IN CNAME myhost.com.
Save the file and restart the named daemon. (or use the command
named.reload)
You should look into getting a book on setting up these files.
The infamous red book by Evi Nemeth et. al. has a good chapter
on configuring DNS. The Redhat Unleashed 2nd. Ed. book also
has a section on configuring DNS in the TCP/IP chapter. If you
want the full and gory details on DNS, check out the O'Reilly and
Associates book titled "DNS and BIND, 2nd. Ed." which will
probably tell you a lot more than you wanted to know about
DNS. =)
-Steve
--
______________________________________________________________________________
Steve Shah (sshah@cs.ucr.edu) | SysAdmin/Coder/Gabbernaut/DJ/Writer/Minister
http://www.cs.ucr.edu/~sshah | We're not dropping out, we're infiltrating.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
"Life is best measured in beats per minute. How alive are you?"
[回答2]
Checkout the DNS-HOWTO...
[回答3]
hi
edit your DNS datafile and place something like this in there:
--<cut>---
@ IN SOA ns.twinwave.net. info.twinwave.net. (
1997120901 ; Serial
43200 ; Refresh 3 hours
3600 ; Retry 1 hour
3600000 ; Expire 1000 hours
86400 ) ; Minimum 24 hours
IN A a.b.c.d
www IN CNAME myhost.com.
--</cut>---
yours
jens knoell
[回答4]
www IN CNAME myhost.com.
[完]
--
Enjoy Linux!
-----It's FREE!-----
※ 来源:.紫 丁 香 bbs.hit.edu.cn.[FROM: mtlab.hit.edu.cn]
Powered by KBS BBS 2.0 (http://dev.kcn.cn)
页面执行时间:3.138毫秒