免费注册 查看新帖 |

Chinaunix

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

解决NIS配置出failed to send 'clear' to local ypserv: RP [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2009-04-18 11:29 |只看该作者 |倒序浏览

解决NIS配置出failed to send 'clear' to local ypserv: RPC:的问题
这两件东西得一起说,前一段时间解决了sendmail开机胡慢的问题,因为改了/etc/sysconfig/network 里面的hostname,开机的时候sendmail需要很长时间来处理,解决的办法是更改/etc/hosts 里面
127.0.0.1 localhost.localdomain localhost

127.0.0.1 yourhostname.localdomain yourhostname
但现在发现这样改在建立nis数据库的时候总是会出这样的错误:
failed to send 'clear' to local ypserv: RPC: Unknown hostUpdating passwd.byuid...
failed to send 'clear' to local ypserv: RPC: Unknown hostUpdating group.byname...
failed to send 'clear' to local ypserv: RPC: Unknown hostUpdating group.bygid...
failed to send 'clear' to local ypserv: RPC: Unknown hostUpdating hosts.byname...
failed to send 'clear' to local ypserv: RPC: Unknown hostUpdating hosts.byaddr...
failed to send 'clear' to local ypserv: RPC: Unknown hostUpdating rpc.byname...
failed to send 'clear' to local ypserv: RPC: Unknown hostUpdating rpc.bynumber...
failed to send 'clear' to local ypserv: RPC: Unknown hostUpdating services.byname...
failed to send 'clear' to local ypserv: RPC: Unknown hostUpdating services.byservicename...
failed to send 'clear' to local ypserv: RPC: Unknown hostUpdating netid.byname...
failed to send 'clear' to local ypserv: RPC: Unknown hostUpdating protocols.bynumber...
failed to send 'clear' to local ypserv: RPC: Unknown hostUpdating protocols.byname...
failed to send 'clear' to local ypserv: RPC: Unknown hostUpdating mail.aliases...
failed to send 'clear' to local ypserv: RPC: Unknown hostgmake[1]: Leaving directory `/var/yp/test'
这个问题我找了很久都没有解决,自己试验了n多次才搞定。解决方法:
更改hosts文件的时候必须保留以前的
127.0.0.1 localhost.localdomain localhost
位置前后没有关系。
下面给出配置的步骤,很简单:
一、查看包安装情况
# rpm -qa  grep portmapportmap-4.0-65.2.2.1
# rpm -qa  grep ^yp (这个^是转义字符,什么意思做下试验去掉看看不同就知道了)ypbind-1.19-8.el5
yp-tools-2.9-0.1
发现没有安装ypserv
二、安装ypserv
# yum -y install ypserv三、配置NISDOMAIN
# vim /etc/sysconfig/network加入一行
NISDOMAIN=test (这个名字可以随便起)
四、启动服务以及建立数据库
# service ypserv startStopping YP server services: [ OK ]
Starting YP server services:   [ OK ]
检查一下nisdomain配置好了没
# ypdomainnametest
OK,这里提一句,如果更改了NIASDOAMIN的内容需要使用
# ypdomainname -y NewNISdomainname才能生效
生成数据库:
# /usr/lib/yp/ypinit -mAt this point, we have to construct a list of the hosts which will run NIS
servers. cp2.localdomain is in the list of NIS server hosts. Please continue to add
the names for the other hosts, one per line. When you are done with the
list, type a .
next host to add: cp2.localdomain
next host to add:
按下control+D
The current list of NIS servers looks like this:
cp2.localdomain
Is this correct? [y/n: y]
按下y回车
正常的话会显示:
We need a few minutes to build the databases...
Building /var/yp/test/ypservers...
Running /var/yp/Makefile...
gmake[1]: Entering directory `/var/yp/test'
Updating passwd.byname...
Updating passwd.byuid...
Updating group.byname...
Updating group.bygid...
Updating hosts.byname...
Updating hosts.byaddr...
Updating rpc.byname...
Updating rpc.bynumber...
Updating services.byname...
Updating services.byservicename...
Updating netid.byname...
Updating protocols.bynumber...
Updating protocols.byname...
Updating mail.aliases...
gmake[1]: Leaving directory `/var/yp/test'
cp2.localdomain has been set up as a NIS master server.
Now you can run ypinit -s cp2.localdomain on all slave server.
如果出现上面的错误就得检查一下你的hosts文件了
客户端连接的时候打开setup 选择里面的Authentication configuration 选择Use NIS 输入相关配置就好了。
               
               
               

本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u3/91804/showart_1903145.html
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP