Step 1: Install related software install the ypserv-2.19-3 and portmap-4.0-65.2.2.1 in the third disc, install the yp-tools-2.9.0.1 and ypbind-1.19-7.e15 In the second disc. Ypserv is the server program of NIS, yp-tools and ypbind are client programs, and portmap is the port allocation program. Generally, you only need to install ypserv and portmap on the NIS server. However, because the server itself is also its own client, we can install these four software packages on the server. Command: # rpm-ivh/mnt/cdrom/Servers/ypserv-2.19-3
# Rps-ivh/mnt/cdrom/Servers/portmap-4.0-65.2.2.1
# Rps-ivh/mnt/cdrom/Servers/yp-tools-2.9.0.1
# Rpm-ivh/mnt/cdrom/Servers/ypbind-1.19-7.e15 Step 2: configure Server Side ① set the NIS domain name to dne.com, run the following command:
# Nisdomainname dne.com
To automatically execute this operation after the system starts, you can add this command to the file/etc/rc. local. Command: echo "/bin/nisdomainname dne.com">/etc/rc. local ② configure the master configuration file/etc/ypserv on the server. conf: add control parameters at the end of the file to allow some clients to access the nis server. 127.0.0.0/255.255.255.0: *: none
192.168.20.0/255.255.255.0: *: none
All: *: deny
Keep the default value for other parameters! ③ Run the command to initialize the NIS Database:/usr/lib/yp/ypinit-m, set the name of the primary database storage host, press CTRL + D, and then press Y to confirm, at last, the program will create the initialized NIS database. After the database is created, corresponding file record settings will be available in the directory/var/yp. ④ Start the service. The related services on the server end include portmap, ypserv, and yppasswdd. The command is as follows: #/etc/init. d/portmap start
#/Etc/init. d/ypserv start
#/Etc/init. d/yppasswdd start