Saturday, January 25, 2014

NIS server Configuration + Linux

  ################ NIS SERVER CONFIGURATION  ##########################

1. yum install ypserv -y
2. nisdomainname SRINIVAS
3. vim /etc/sysconfig/network
   NISDOMAIN=SRINIVAS

4. service network restart
5. vim /etc/exports
   /home   *(rw,sync)

6. service portmap restart
7. service nfs restart
8. service ypserv restart
9. cd /var/yp
10. /usr/lib/yp/ypinit -m


############ NIS CLIENT  ####################

1. umount /home
2. comment home-dir line in /etc/fstab 
3. authconfig-tui      //Provide your nisdomain and nisservers ip
4. ypwhich      ->shows niservers hostname/ip
5. vim /etc/auto.master
   /home   /etc/auto.misc

6. /etc/auto.misc
   u1    -fstype=nfs   192.168.0.82:/home/u1   //Login as u1
   *     -fstype=nfs   192.168.0.82:/&        //Login as any user

7. service autofs restart
8. Log out and login as u1 user.



# ##############MASTER ENTRY WHILE SETTING UP SLAVE ###################

1. vim /var/yp/Makefile
   NOPUSH=False

2. /usr/lib/yp/ypint -m
3. service ypserv restart


           ########### SLAVE ENTRIES ###########

1.  yum install ypserv
2.  vim /etc/sysconfig/network
    NISDOMAIN=SRINIVAS
3. service network restart
4. nisdomainname SRINIVAS
5. service ypserv restart
6. /usr/lib/yp/ypinit -s <master'shostname) //Better configure Dns or hosts file


NIS CLIENT

1. authconfig-tui              (Bind to both master,slave ip)
2. ypwhich                     ->shows masters ip
3. Stop ypserv in master
4. ypwhich                     ->shows slave ip



No comments:

Post a Comment