1、关闭防火墙
systemctl disable firewalld
systemctl stop firewalld

2、安装软件包
yum -y install yp-tools ypbind ypserv

3、基本配置
nisdomainname shdandan.com
echo "NISDOMAIN=shdandan.com" >> /etc/sysconfig/network

echo "192.168.2.130/24 : *       : *                : none" >> /etc/ypserv.conf

for i in ypserv yppasswdd rpcbind; do systemctl start $i; done
for i in ypserv yppasswdd rpcbind; do systemctl enable $i; done

4、初始化数据库
/usr/lib64/yp/ypinit -m

5、新增用户
useradd user01
passwd user01

6、更新nis用户数据库
make -C /var/yp/
systemctl restart ypserv

7、配置系统使用nis验证
authconfig-tui

12-31 04:02