nis

[root@server-rhel6 ~]# yum install rpcbind ypserv ypbind -y

[root@server-rhel6 ~]# vim /etc/sysconfig/network
NETWORKING=yes
HOSTNAME=server-rhel6
NISDOMAIN=rafi.com

[root@server-rhel6 ~]# rpcinfo -u localhost ypserv
rpcinfo: RPC: Port mapper failure – Unable to receive: errno 111 (Connection refused)
program 100004 is not available

[root@server-rhel6 ~]# /usr/lib64/yp/ypinit -m

At this point, we have to construct a list of the hosts which will run NIS
servers.  server-rhel6 is in the list of NIS server hosts.  Please continue to add
the names for the other hosts, one per line.  When you are done with the
list, type a <control D>.
next host to add:  server-rhel6
next host to add:
The current list of NIS servers looks like this:

server-rhel6

Is this correct?  [y/n: y]  y
We need a few minutes to build the databases…
Building /var/yp/(none)/ypservers…
Running /var/yp/Makefile…
Domain name cannot be (none)

server-rhel6 has been set up as a NIS master server.

Now you can run ypinit -s server-rhel6 on all slave server.

[root@server-rhel6 ~]# /etc/init.d/rpcbind status
rpcbind is stopped
[root@server-rhel6 ~]# /etc/init.d/rpcbind start
Starting rpcbind:                                          [  OK  ]
[root@server-rhel6 ~]# /etc/init.d/ypserv status
ypserv is stopped
[root@server-rhel6 ~]# /etc/init.d/ypserv start
Setting NIS domain name rafi.com:                          [  OK  ]
Starting YP server services:                               [  OK  ]
[root@server-rhel6 ~]# /etc/init.d/rpcbind restart
Stopping rpcbind:                                          [  OK  ]
Starting rpcbind:                                          [  OK  ]
[root@server-rhel6 ~]# /etc/init.d/ypserv restart
Stopping YP server services:                               [  OK  ]
Starting YP server services:                               [  OK  ]
[root@server-rhel6 ~]# rpcinfo -u localhost ypserv
program 100004 version 1 ready and waiting
program 100004 version 2 ready and waiting
=========================================================
[root@rhel6-client1 ~]# yum install ypbind rpcbind -y

[root@rhel6-client1 ~]# /etc/init.d/rpcbind restart
Stopping rpcbind:                                          [  OK  ]
Starting rpcbind:

[root@rhel6-client1 ~]# vim /etc/sysconfig/network
NETWORKING=yes
HOSTNAME=rhel6-client1
NISDOMAIN=rafi.com

[root@rhel6-client1 ~]# authconfig-tui  ====>select Use Nis
[*] Use NIS
Advertisements
Posted in: nis

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s