LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
楼主: keelort

Gentoo 的主机域名在什么地方设置?[已解决]

[复制链接]
 楼主| 发表于 2007-8-12 12:49:08 | 显示全部楼层
太不幸了,按照楼上两位的方法,dns可以正常解析,可是还是显示 This is server.(none) (Linux i686 2.6.21-gentoo-r4) 10:36:43
回复 支持 反对

使用道具 举报

发表于 2007-8-12 13:05:33 | 显示全部楼层
/etc/resolv.conf
清空

/etc/conf.d/net
  1. config_eth0=( "10.5.0.222 netmask 255.255.255.0" )
  2. config_eth1=( "192.168.0.1 netmask 255.255.255.0" )
  3. routes_eth0=( "default via 10.5.0.1" )
  4. dns_servers_eth0="219.150.32.132 202.98.0.68"
复制代码

/etc/hosts
  1. 127.0.0.1 localhost localhost.localdomain
  2. 127.0.0.1 server.test.com server
  3. # IPV6 versions of localhost and co
  4. fe00::0 ip6-localnet
  5. ff00::0 ip6-mcastprefix
  6. ff02::1 ip6-allnodes
  7. ff02::2 ip6-allrouters
  8. ff02::3 ip6-allhosts
复制代码
回复 支持 反对

使用道具 举报

 楼主| 发表于 2007-8-12 18:39:14 | 显示全部楼层
Post by midx
/etc/resolv.conf
清空

/etc/conf.d/net
  1. config_eth0=( "10.5.0.222 netmask 255.255.255.0" )
  2. config_eth1=( "192.168.0.1 netmask 255.255.255.0" )
  3. routes_eth0=( "default via 10.5.0.1" )
  4. dns_servers_eth0="219.150.32.132 202.98.0.68"
复制代码

/etc/hosts
  1. 127.0.0.1 localhost localhost.localdomain
  2. 127.0.0.1 server.test.com server
  3. # IPV6 versions of localhost and co
  4. fe00::0 ip6-localnet
  5. ff00::0 ip6-mcastprefix
  6. ff02::1 ip6-allnodes
  7. ff02::2 ip6-allrouters
  8. ff02::3 ip6-allhosts
复制代码

还是一样,难道和内核编译参数有关系吗?
回复 支持 反对

使用道具 举报

发表于 2007-8-12 18:48:47 | 显示全部楼层
这样啊?……据说……是RPWT
回复 支持 反对

使用道具 举报

 楼主| 发表于 2007-8-12 20:07:18 | 显示全部楼层
Post by midx
这样啊?……据说……是RPWT

不会吧:ask,其实实在不好意思问这么简单的问题,但是实在搞不定,原来没遇到过这种问题
回复 支持 反对

使用道具 举报

发表于 2007-8-12 20:48:22 | 显示全部楼层
回复 支持 反对

使用道具 举报

 楼主| 发表于 2007-8-12 21:03:44 | 显示全部楼层
Post by zhou3345
lz是不是要看这个?
http://linux.vbird.org/linux_server/0430nis.php

和NIS无关吧,我这个是单个电脑
回复 支持 反对

使用道具 举报

发表于 2007-8-12 21:07:37 | 显示全部楼层
试试dns_domain和dns_server,不要加ethX看看,可能有效。
回复 支持 反对

使用道具 举报

发表于 2007-8-12 21:32:15 | 显示全部楼层

奉陪到底

问问搂住,
如果新装的系统,没看手册要打PP;
如果非新装系统,以前是怎么用的?

  1. Code Listing 5: Setting the domainname

  2. # nano -w /etc/conf.d/net

  3. (Set the dns_domain variable to your domain name)
  4. dns_domain_lo="homenetwork"

  5. Note: If you choose not to set a domainname, you can get rid of the [size=5][color="DarkRed"][b]"This is hostname.(none)" messages[/b][/color][/size] at your login screen by editing /etc/issue. Just delete the string .\O from that file.

  6. If you have a NIS domain (if you don't know what that is, then you don't have one), you need to define that one too:
复制代码

  1. Code Listing 13: Opening /etc/hosts

  2. # nano -w /etc/hosts

  3. Code Listing 14: Filling in the networking information

  4. (This defines the current system)
  5. 127.0.0.1     tux.homenetwork tux localhost

  6. [size=5][color="DarkRed"][b](Define extra systems on your network,
  7. they need to have a static IP to be defined this way.)[/b][/color][/size]
  8. 192.168.0.5   jenny.homenetwork jenny
  9. 192.168.0.6   benny.homenetwork benny

  10. Save and exit the editor to continue.
复制代码
回复 支持 反对

使用道具 举报

发表于 2007-8-12 21:32:24 | 显示全部楼层
vim /etc/issue
把内容改成如下:

  1. This is \n.\o (\s \m \r) \t
复制代码
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表