Install NIS server software package set time and time-udp Service startup status establish NIS domain name in server set ypserv service configuration file start NIS Server build database install NIS client software package set/etc/hosts file in, the NIS server host records the establishment of the NIS domain name settings yp. conf configuration file the client configuration file sets nsswitch. in the conf file, log on to the configuration file and start the ypbind service program. Use the NIS client to test the connection with the NIS server.
Install the NIS Server Software Package
Set the start status of the time and time-udp services
Create an NIS domain name in the server
Configure the ypserv service configuration file
Start NIS Server
Build a database
Install the NIS client package
Set the NIS Server Host record in the/etc/hosts file
Create an NIS domain name
Set the yp. conf configuration file client configuration file
Set nsswitch. conf file User Logon configuration file
Start the ypbind service program
Test the connection to the NIS server using the NIS client
NIS client User Logon
Server Configuration
1. Install and start necessary services
Rpm-ivh ypserv-xxx.rpm
Chkconfig time on
Chkconfig time-udp on
Service xinetd restart
2. Create and add a domain name
Host Name
Hostname ypserv
Vi/etc/sysconfig/network
HOSTNAME = ypserv
Vi/etc/hosts
Domain
Nisdomainname nistest
Echo '/bin/nisdomain nistest'>/etc/rc. d/rc. local
Echo 'nisdomain = nistest '>/etc/sysconfig/network
3. Modify the ypserv. conf configuration file.
Ypserv. conf
You can set access control for the authenticated database in the configuration file.
Vi/etc/ypserv. conf
Comment out the last two lines that allow all programs to access
192.168.63.0/255.255.255.0: *: none
127.0.0.0/255.255.255.0: *: none
*: Deny
4. Create a securenets Security Configuration File
The securenets file is used to control access to the NIS client host.
The securenets file needs to be created manually
Vi/var/yp/securenets
Host 127.0.0.1
255.255.255.0 192.168.63.0
5. Start the NIS Server
The NIS server requires the support of the portmap service and starts the ypserv and yppasswdd services.
Service portmap status is enabled by default.
Service ypserv start
Service yppasswdd start