Home Linux Community Community Blogs Desktops Config NIS Server/Client on CentOS 5

Config NIS Server/Client on CentOS 5

I created two VMs via VirtualBox, named CentOS_Srv and CentOS_Cli with the IPs and, networking type is bridged.

 1. ENV

OS: CentOS 5.3

Software: ypserv, yp-tools, ypbind, etc

NIS Server:

NIS Client:

2.  Steps

1) Config NFS in the NFS server (use the NIS Server here)

[root@glynnsrv]vi /etc/exports, add the following line:

/home  *(rw,sync)

this allow  all host to mount /home as writable.

2)Make effective

[root@glynnsrv] exportfs -a

3)Start NFS server

[root@glynnsrv]service nfs start

4)Let nfs start when boot

[root@glynnsrv]chkconfig nfs on

 5)Config the firewall


select firewall settings and add NFS service.

6)Config the NFS client

[root@glynn]mv /home /home.bak

[root@glynn]mkdir /home

[root@glynn]vi /etc/hosts localhost localhost glynn glynnsrv

[root@glynn]mount -t nfs glynnsrv:/home /home

Let autofs mount the nfs at boot time:

[root@glynn]vi /etc/auto.master # add the following line:

 /home      /etc/auto.home  --timeout 600

[root@glynn]vi /etc/auto.home # add the following line:

  *    -fstype=nfs,r2

 [root@glynn]chkconfig autofs on

 7) Config NIS Server

a) install needed softwares:

[root@glynnsrv] yum -y install ypserv ypbind yp-tools

b)vi /etc/sysconfig/network





Subscribe to Comments Feed

Upcoming Linux Foundation Courses

  1. LFS520 Essentials of OpenStack Administration
    07 Dec » 10 Dec - N. Reading + Virtual
  2. LFS426 Linux Performance Tuning
    07 Dec » 10 Dec - Virtual
  3. LFS416 Linux Security
    07 Dec » 10 Dec - Virtual

View All Upcoming Courses

Who we are ?

The Linux Foundation is a non-profit consortium dedicated to the growth of Linux.

More About the foundation...

Frequent Questions

Linux Training / Board