hostname zou.com

vim /etc/hosts

    服ip    zou.com域名    zou.com主机名

vim /etc/sysconfig/network

    修改主机名为zou.com

    NIS_DOMAIN=zou.comn   域

ping zou.com测试

nisdomainanme zou.com   指定域名

yum list | grep ypsercv yp-tools

yum isntall ypserv yp-tools

/etc/init.d/yperv start

chkconfig ypserv on

/etc/init.dyppasswdd start

chkconfig yppasswdd on

创建三个用户,分配密码

/usr/lib64/yp/ypinit -m   启动域服务,crtl+D创建域


客户端

rpm -qa | grep ypbind

sytstem-config-authentication  选择nis,zou.com ,输入服务其ip


服务器

确认iptables关闭,或者是已经做好相应规则

tail /etc/passwd  见到新建的用户此时su - 用户  ,会进入终端

vim /etc/exports

    /home 192.168.0.0/24(rw,no_root_squash)

exportfs -rv

/etc/init.d/nfs restart

showmount -e 服ip   远程探测



客户端

vim /etc/auto.master

    /home    /etc/auto.home

cp /auto.misc /auto.home

vim /etc/auto.home

    *     -rw,soft,intr    服ip:/home/&



reboot,就可以用新建的用户登录了,这就是域用户