首页 / LINUX / Linux NIS server
Linux NIS server
内容导读
互联网集市收集整理的这篇技术教程文章主要介绍了Linux NIS server,小编现在分享给大家,供广大互联网技能从业者学习和参考。文章包含4063字,纯文字阅读大概需要6分钟。
内容图文
![Linux NIS server](/upload/InfoBanner/zyjiaocheng/1260/9ee0b47f5af24a608407dc0de1deddc6.jpg)
软件安装
[root@alicia ~]# yum install ypserver [root@alicia ~]# rpm -qa | grep yp ypbind-1.19-12.el5_6.1 ypserv-2.19-10.el5_9.1 yp-tools-2.9-2.el5
[root@alicia ~]# nisdomainname nis [root@alicia ~]# vi /etc/sysconfig/network 1 NETWORKING=yes 2 NETWORKING_IPV6=yes 3 HOSTNAME=alicia.net 4 NISDOMAIN=nis
[root@alicia ~]# vi /etc/rc.d/rc.local 1 #!/bin/sh 2 # 3 # This script will be executed *after* all the other init scripts. 4 # You can put your own initialization stuff in here if you don‘t 5 # want to do the full Sys V style init stuff. 6 7 touch /var/lock/subsys/local 8 nisdomainname nis
[root@alicia ~]# vi /etc/ypserv.conf 50 127.0.0.1/255.255.255.0 : * : * : none 51 10.8.118.0/255.255.255.0 : * : * : none 52 * : * : * : deny
[root@alicia ~]# useradd nis [root@alicia ~]# passwd nis Changing password for user nis. New UNIX password: BAD PASSWORD: it is based on a dictionary word Retype new UNIX password: passwd: all authentication tokens updated successfully.
[root@alicia ~]# service ypserv restart Stopping YP server services: [FAILED] Starting YP server services: [ OK ] [root@alicia ~]# /usr/lib/yp/ypinit -m At this point, we have to construct a list of the hosts which will run NIS servers. centos 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 <control D>. next host to add: centos next host to add: alicia.net next host to add: alicia next host to add: The current list of NIS servers looks like this: centos alicia.net alicia Is this correct? [y/n: y] y We need a few minutes to build the databases... Building /var/yp/nis/ypservers... Running /var/yp/Makefile... gmake[1]: Entering directory `/var/yp/nis‘ 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/nis‘ centos has been set up as a NIS master server. Now you can run ypinit -s centos on all slave server.
[root@alicia ~]# service ypserv restart Stopping YP server services: [ OK ] Starting YP server services: [ OK ] [root@alicia ~]# service yppasswdd restart Stopping YP passwd service: [FAILED] Starting YP passwd service: [ OK ]
软件安装
[root@Samsun ~]# rpm -qa | grep yp yp-tools-2.9-2.el5 ypbind-1.19-12.el5_6.1
[root@Samsun ~]# nisdomainname nis [root@Samsun ~]# vi /etc/sysconfig/network NETWORKING=yes NETWORKING_IPV6=yes HOSTNAME=Samsun NISDOMAIN=nis [root@Samsun ~]# vi /etc/rc.d/rc.local #!/bin/sh # # This script will be executed *after* all the other init scripts. # You can put your own initialization stuff in here if you don‘t # want to do the full Sys V style init stuff. touch /var/lock/subsys/local domainname nis ~
[root@Samsun ~]# vi /etc/hosts # Do not remove the following line, or various programs # that require network functionality will fail. 127.0.0.1 centos localhost.localdomain localhost Samsun Samsun.net ::1 localhost6.localdomain6 localhost6 10.8.118.100 alicia.net
[root@alicia ~]# vi /etc/yp.conf 22 ypserver alicia.net 23 domain nis
[root@alicia ~]# vi /etc/nsswitch.conf 28 # Example: 29 #passwd: db files nisplus nis 30 #shadow: db files nisplus nis 31 #group: db files nisplus nis 32 33 passwd: files nis 34 shadow: files nis 35 group: files nis
[root@alicia ~]# service ypbind restart Shutting down NIS services: [FAILED] Binding to the NIS domain: [ OK ] Listening for an NIS domain server.
原文:http://my.oschina.net/hding/blog/373723
内容总结
以上是互联网集市为您收集整理的Linux NIS server全部内容,希望文章能够帮你解决Linux NIS server所遇到的程序开发问题。 如果觉得互联网集市技术教程内容还不错,欢迎将互联网集市网站推荐给程序员好友。
内容备注
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 gblab@vip.qq.com 举报,一经查实,本站将立刻删除。
内容手机端
扫描二维码推送至手机访问。