NIS服务器架设教程(2)
3.建立NIS域名
[root@crliflinux]# nisdomainname nistest
[root@crliflinux]# cat /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
/bin/nisdomainname nistest 添加这行使之开机运行
修改/etc/sysconfig/network文件,增加此行:NISDOMAIN=nistest
4.设置yp.conf
[root@localhost ~]# cat /etc/yp.conf
# generated by /sbin/dhclient-script
domain domain.org broadcast
domain nistest 添加这句
ypserver crliflinuxistest
在/etc/passwd最下面添加
+::::::
5.设置nsswitch.conf
vi /etc/nsswitch.conf 修改为这样
passwd: files nis nisplus
shadow: files nis nisplus
group: files nis nisplus
#hosts: db files nisplus nis dns
hosts: files nis dns
6.启动ypbind服务程序
[root@localhost ~]# service portmap status
portmap (pid 1683) is running...
[root@localhost ~]# service ypbind start
Binding to the NIS domain: [ OK ]
Listening for an NIS domain server..
在NIS服务器中输出NFS共享目录
在nis服务器上
[root@localhost ~]# vi /etc/exports 添加
/home 192.168.1.0/24(rw,async,np_root_squash)
[root@localhost ~]#service nfs start
在NIS客户机上
[root@localhost ~]#vi /etc/fstab
Crliflinuxistest:/home/ /home nfs defaults 0 0
顶(0)
踩(0)
- 最新评论
