免费注册 查看新帖 |

Chinaunix

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

请教一个unix中的hostname的问题 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2008-05-15 12:52 |只看该作者 |倒序浏览
系统不久前安装完毕,os是hp-unix 11.31,itanium
在安装某软件的时候报了一个错误,然后有log可以看,log内容是:
Error:Failed to detemine hostname

这里的hostname指的是本机器自身
请问这个问题可能是有什么原因引起的?
另外/etc/hosts文件里面为自身添加了hostname到ip地址的映射

请教大家,谢谢

论坛徽章:
0
2 [报告]
发表于 2008-05-15 14:22 |只看该作者
root  下执行
#set_parms hostname改下,也许你也改对,改好后要重起的。
---------------------------------------------------------------------------
root:/#set_parms hostname

_______________________________________________________________________________
For the system to operate correctly, you must assign it a unique
system name or "hostname".  The hostname can be a simple name
(example: widget) or an Internet fully-qualified domain name
(example: widget.redrock-cvl.hp.com).

A simple name, or each dot (.) separated component of a domain name, must:

    * Start and end with a letter or number.

    * Contain no more than 63 characters.

    * Contain only letters, numbers, underscore (_), or dash (-).
      The underscore (_) is not recommended.

NOTE: The first or only component of a hostname should contain 8
      characters or less for compatibility with HP-UX `uname'.

The current hostname is test.
_______________________________________________________________________________

Enter the system name, then press [Enter] or simply press [Enter]
to retain the current host name (fa-temp):

论坛徽章:
0
3 [报告]
发表于 2008-05-15 22:12 |只看该作者
检查hostname,检查/etc/hosts文件。注意hosts文件的语法格式。

论坛徽章:
0
4 [报告]
发表于 2008-05-19 11:25 |只看该作者

回复 #3 五“宅”一生 的帖子

问题已经解决了,主要是DNS没有能解析主机名字
可以用nslookup去检测主机名的解析
然后修改/etc/resolv.conf和/etc/nsswitch.conf
谢谢

论坛徽章:
0
5 [报告]
发表于 2008-05-19 22:36 |只看该作者
解决就好。支持!
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP