1818IP-服务器技术教程,云服务器评测推荐,服务器系统排错处理,环境搭建,攻击防护等

当前位置:首页 - 运维 - 正文

君子好学,自强不息!

NIS服务器故障排除

2022-11-17 | 运维 | 1818ip | 650°c
A+ A-

NIS服务器生成数据库的时候出错:Unknown hostUpdating protocols… 目标:将主机A配置为nis服务器,nis域名为testnis,主机A的nis域名为yangbo.testnis 步骤如下:

1. 修改/etc/sysconfig/network文件, 加入一行:NISDOMAIN=testnis,即配置nis域名为testnis,并且修改HOSTNAME为yangbo.testnis 2. hostname命令修改主机名为yangbo.testnis 3. 修改/etc/hosts文件,将127.0.0.1这一行改为:127.0.0.1 yangbo.testnis yangbo yangbo 4. 启动ypserv,yppasswdd服务成功 5. rpcinfo查询ypserv和yppasswd已经成功使用了RPC服务: 运行 rpcinfo -u yangbo ypserv,结果为 program 100004 version 1 ready and waiting program 100004 version 2 ready and waiting 运行 rpcinfo -u yangbo yppasswdd,结果为 program 100009 version 1 ready and waiting 6. 建立NIS数据库,这一步遇到了问题,系统提示:failed to send ‘clear’ to local ypserv: RPC: Unknown hostUpdating passwd.byuid…

——–我到网上查,有些人是说这是因为找不到的主机及ip 对应关系,可是在/etc/hosts文件中,这个映射关系我已经建立了阿。莫非我配置的不对?请问该怎么配置? [root@yangbo ~]# /usr/lib/yp/ypinit -m

At this point, we have to construct a list of the hosts which will run NIS servers. yangbo.testnis is in the list of NIS server hosts. Please continue toadd the names for the other hosts, one per line. When you are done with the list, type a <control D>. next host to add: yangbo.testnis next host to add: The current list of NIS servers looks like this:

yangbo.testnis

Is this correct? [y/n: y] y We need a few minutes to build the databases… Building /var/yp/testnis/ypservers… Running /var/yp/Makefile… gmake[1]: Entering directory `/var/yp/testnis’ Updating passwd.byname… 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/testnis’

yangbo.testnis has been set up as a NIS master server.

Now you can run ypinit -s yangbo.testnis on all slave server.  

本文来源:1818IP

本文地址:https://www.1818ip.com/post/10053.html

免责声明:本文由用户上传,如有侵权请联系删除!

发表评论

必填

选填

选填

◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。