服务器端
1.配置yum
2.安装ypserv
3.创建nis用户的专用目录mkdir /nishome
4.添加nis认证用户
useradd -d /nishome/hehe -u 1007 hehe
useradd -d /nishome/heihei -u 1008 heihei
5.指定nis域nisdomainname example.com
6.将nis域指定到开机启动脚本中ehco "/bin/nisdomainname example.com" >> /etc/rc.local
7.在网路选项中添加nis域vim /etc/sysconfig/network
NISDOMAIN=example.com
8.启动ypserv服务systemctl restart ypserv.service
9.生成nis数据库
/usr/lib64/yp/ypinit -m
ctrl+d
y
11.共享nis用户的家目录vim /etc/exports
/nishome *(rw)
12.重启服务systemctl restart nfs.service systemctl restart ypserv.service
13.开机启动nfs和ypserv systemctl enable nfs-server.service systemctl enable ypserv.service
14.关闭防火墙
systemctl stop firewalled.service
客户端
1.关闭防火墙 将selinux改为警告
2.配置yum
3.