Linux NIS Server

Step 1
#yum install ypserv
Step 2
#chkconfig time on or chkconfig time-stream on
#chkconfig time-udp on or chkconfig time-dgram on
#service xinetd restart
Step 3
#nisdomainname contoso.msft
#echo '/bin/nisdomainname contoso.msft' >> /etc/rc.d/rc.local
#echo 'NISDOMAIN=contoso.msft' >> /etc/sysconfig/network
Step 4
#vim /etc/ypserv.conf
10.1.1.0/255.255.255.0          :  *               :  *                 :   port
127.0.0.1/255.255.255.0        :  *               :  *                 :   port
*                             :  *               :  *                 :   deny
#vim /var/yp/securenets
host 127.0.0.1
255.255.255.0 10.1.1.0
Step 5
#service portmap status
#service ypserv start
#service yppasswdd start
Step 6
#rpcinfo -p localhost
#rpcinfo -u localhost ypserv
Step 7
#/usr/lib64/yp/ypinit -m
Step 8
#echo '/bin/nisdomainname contoso.msft' >> /etc/rc.d/rc.local
#echo 'domain example.com server nis.example.com >> /etc/yp.conf
#vim /etc/nsswitch.conf
passwd:      files nis
shadow:     files  nis
group:        files  nis
hosts:         files nis dns
#yptest
#ypwhich
#ypwhich -x
#ypcat -x
#ypcat passwd
 

你可能感兴趣的:(linux,职场,休闲,NIS)