- 论坛徽章:
- 0
|
今天配置了一下NFS,在使用命令showmount 和rpcinfo的时候,遇到一个小小的问题,就是当用IP做参数时,可以返回正确的结果;而用主机名代替的时候就说找不到该主机,比如:
showmount -e 10.0.0.23 =====>这时候可以正确返回结果
showmount -e hostc =====>hostc为主机名,返回的错误是:
showmount: can't get address for hostc
我用的RedHat9,我也设置了/etc/hosts和/etc/sysconfig/network配置文件,将主机名改为一致了,并且运行hostname命令也能返回正确的结果hostc,这两个配置文件如下:
/etc/hosts:
# Do not remove the following line, or various programs
# that require network functionality will fail.
10.0.0.23 hostc
127.0.0.1 localhost.localdomain localhost
/etc/sysconfig/network:
NETWORKING=yes
HOSTNAME=hostc
我应该如何配置才能将主机名和IP绑定在一起呢,这样的话通过两者都可以使用了,谢谢!
[ 本帖最后由 bulebaby 于 2006-9-27 19:29 编辑 ] |
|