Configure NIS server
In this example we will configure a NIS server and a user nis1 will login from client side.For this example we are using two systems one linux server one linux clients . To complete these per quest of nis server Follow this link
Network configuration in Linux
- A linux server with ip address 192.168.0.254 and hostname Server
- A linux client with ip address 192.168.0.1 and hostname Client1
- Updated /etc/hosts file on both linux system
- Running portmap and xinetd services
- Firewall should be off on server
Now check nfs,ypserv,yppasswdd,ypbind, portmap, xinetd service in system service it should be on
#setup Select System service from list [*]portmap [*]xinetd [*]nfs [*]ypserv [*]yppasswdd [*]ypbind
Set hostname and NIS domain name as shown here and save file
Now create a user named nis1 and give his home directory on /rhome with full permission
Now open /etc/exports file
share /rhome/nis1 directory for network
save this with :wq and exit
now open /var/yp/Makefile file
and locate line number 109 [ use ESC + : +set nu command to show hidden lines or read our vi editor article to know more about vi command line option ]
Now remove other entry from this line excepts passwd group hosts netid \ [as shown here]
save this with :wq and exit
Now restart these service
#service portmap restart #service xinetd restart #service nfs restart #service ypserv restart #service yppasswdd restart
Now change directory to /var/yp and run make command to create database
now update this database by running this commands [ first add server and then add all client machine one by one. After adding press CTRL+D to save, confirm by pressing y]
Now once again restart all these service this time there should be no error
#service portmap restart #service xinetd restart #service nfs restart #service ypserv restart #service yppasswdd restart #service ypbind restart
#chkconfig portmap on #chkconfig xinetd on #chkconfig nfs on #chkconfig ypserv on #chkconfig yppasswdd on #chkconfig ypbind on
Client configuration
Before you start client configuration we suggest you to check proper connectivity between server and client. First try to login on NIS server from telnet. If you can successfully login via telnet then try to mount /rhome/nis1 directory via nfs server. If you get any error in telnet or nfs then remove those error first. You can read our pervious article for configuration related help.To know how configure nfs server read
How to configure nfs server in Linux
To know how configure telnet server read
How to configure telnet server in Linux
Once you successfully completed necessary test then start configuration of client sides.
Two rpm are required to configure clients yp-tools and ypbind check them for install
now open /etc/sysconfig/network file
and make change as shown here
save the file with :wq and exit
now run setup command and select authentication configuration from list
#setup
now check mark on NIS and enter on next
Set domain name to rhce and server to 192.168.0.254 and click on ok
No error should be occurred here if you see any error then check all configuration.
no open /etc/auto.master file
in the end of file do editing of /rhome as shown here
save the file with :wq and exit
now open /etc/auto.misc file
in the end of file do editing of user nis1 as shown here
save the file with :wq and exit
now restart autofs and ypbind service
set these service on via chkconfig commands
#chkconfig autofs on #chkconfig ypbind on
#reboot -f
No comments:
Post a Comment