Reference taken from : http://www.server-world.info/en/note?os=Debian_6.0&p=nis&f=1\
OS: debian el6.0.3 i386
NIS Domain name:
mansoor.com
IP: 192.168.122.8
System Name : akt-vpc
Installation started
Step 1 # Add the below
line in sources.list
Step 2 # dpkg –install nis_3.17-32_i386.deb
Step 3 # apt-get install portmap make rpcbind
Step 4 # service rpcbind restart
Step 5 #
service nis restart
Step 6 # root@akt-vpc:~# vi
/etc/default/nis
#
line 6: change (set NIS master server)
NISSERVER=master
# This line gives access to everybody. PLEASE
ADJUST!
# make it comment
#0.0.0.0 0.0.0.0
#
add at the last: IP address you allow
255.255.255.0 192.0.0.0
# line 119: add
ALL = passwd shadow group hosts rpc services netid protocols
netgrp
Step 10 # root@akt-vpc:~# vi /etc/hosts
Step 10 # root@akt-vpc:~# vi /etc/hosts
127.0.0.1 localhost
127.0.1.1 akt-vpc.server.world
akt-vpc
# add own IP address for NIS database
10.0.0.30 akt-vpc.server.world
akt-vpc
Step 11 # root@akt-vpc:~# /usr/lib/yp/ypinit -m
# update NIS database
At this point, we have to construct a list of the
hosts which will run NIS
servers. master 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: akt-vpc
next host to add: # push Ctrl+D
servers. master 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: akt-vpc
next host to add: # push Ctrl+D
The current list of NIS servers looks like this:
akt-vpc
Is this correct? [y/n: y] y
akt-vpc
Is this correct? [y/n: y] y
We need a few minutes to build the databases...
Building /var/yp/server.world/ypservers...
gethostbyname(): Success
Running /var/yp/Makefile...
make[1]: Entering directory `/var/yp/server.world'
Updating passwd.byname...
failed to send 'clear' to local ypserv: RPC: Program not registeredUpdating passwd.byuid...
failed to send 'clear' to local ypserv: RPC: Program not registeredUpdating group.byname...
failed to send 'clear' to local ypserv: RPC: Program not registeredUpdating group.bygid...
failed to send 'clear' to local ypserv: RPC: Program not registeredUpdating shadow.byname...
failed to send 'clear' to local ypserv: RPC: Program not registeredUpdating hosts.byname...
failed to send 'clear' to local ypserv: RPC: Program not registeredUpdating hosts.byaddr...
failed to send 'clear' to local ypserv: RPC: Program not registeredUpdating rpc.byname...
failed to send 'clear' to local ypserv: RPC: Program not registeredUpdating rpc.bynumber...
failed to send 'clear' to local ypserv: RPC: Program not registeredUpdating services.byname...
failed to send 'clear' to local ypserv: RPC: Program not registeredUpdating services.byservicename...
failed to send 'clear' to local ypserv: RPC: Program not registeredUpdating netid.byname...
failed to send 'clear' to local ypserv: RPC: Program not registeredUpdating protocols.bynumber...
failed to send 'clear' to local ypserv: RPC: Program not registeredUpdating protocols.byname...
failed to send 'clear' to local ypserv: RPC: Program not registeredUpdating netgroup...
failed to send 'clear' to local ypserv: RPC: Program not registeredUpdating netgroup.byhost...
failed to send 'clear' to local ypserv: RPC: Program not registeredUpdating netgroup.byuser...
failed to send 'clear' to local ypserv: RPC: Program not registeredmake[1]: Leaving directory `/var/yp/server.world'
Building /var/yp/server.world/ypservers...
gethostbyname(): Success
Running /var/yp/Makefile...
make[1]: Entering directory `/var/yp/server.world'
Updating passwd.byname...
failed to send 'clear' to local ypserv: RPC: Program not registeredUpdating passwd.byuid...
failed to send 'clear' to local ypserv: RPC: Program not registeredUpdating group.byname...
failed to send 'clear' to local ypserv: RPC: Program not registeredUpdating group.bygid...
failed to send 'clear' to local ypserv: RPC: Program not registeredUpdating shadow.byname...
failed to send 'clear' to local ypserv: RPC: Program not registeredUpdating hosts.byname...
failed to send 'clear' to local ypserv: RPC: Program not registeredUpdating hosts.byaddr...
failed to send 'clear' to local ypserv: RPC: Program not registeredUpdating rpc.byname...
failed to send 'clear' to local ypserv: RPC: Program not registeredUpdating rpc.bynumber...
failed to send 'clear' to local ypserv: RPC: Program not registeredUpdating services.byname...
failed to send 'clear' to local ypserv: RPC: Program not registeredUpdating services.byservicename...
failed to send 'clear' to local ypserv: RPC: Program not registeredUpdating netid.byname...
failed to send 'clear' to local ypserv: RPC: Program not registeredUpdating protocols.bynumber...
failed to send 'clear' to local ypserv: RPC: Program not registeredUpdating protocols.byname...
failed to send 'clear' to local ypserv: RPC: Program not registeredUpdating netgroup...
failed to send 'clear' to local ypserv: RPC: Program not registeredUpdating netgroup.byhost...
failed to send 'clear' to local ypserv: RPC: Program not registeredUpdating netgroup.byuser...
failed to send 'clear' to local ypserv: RPC: Program not registeredmake[1]: Leaving directory `/var/yp/server.world'
master has been set up as a NIS master server.
Now you can run ypinit -s master on all slave server.
Step 12 # root@akt-vpc:~# /etc/init.d/nis start
Now you can run ypinit -s master on all slave server.
Step 12 # root@akt-vpc:~# /etc/init.d/nis start
Step 14 root@akt-vpc:/var/yp# make
No comments:
Post a Comment