Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Linux+ Certification Bible.pdf
Скачиваний:
46
Добавлен:
15.03.2015
Размер:
3.78 Mб
Скачать

238 Part III Configuration

NIS client configuration

The NIS is configured for the client in order to allow them to participate in an NIS network. To participate as an NIS client, you need the ypbind, ypwhich, ypcat, yppoll, ypmatch programs. The most important program is ypbind, so it must be running at all times; it is a daemon process and needs to be started from the system’s startup file, such as /etc/init.d/nis, /sbin/init.d/ypclient, /etc/rc.d/init.d/ypbind, and /etc/rc.local. Hopefully, you planned for these packages during the installation of the Linux distribution and they are already installed and configured to start when the system boots. If this is not the case, and if the files are needed for installation, they are available at www.kernel.org (tarball) and www.redhat.com (for RPM versions).

See Chapter 5 for more information on software installation.

The location of the ypbind daemon is typically the /usr/sbin directory. The other binaries (ypwhich, ypcat, yppasswd, yppoll, ypmatch) are normally located in /usr/bin. Most current ypbind versions have a configuration file called /etc/yp.conf. For host lookups, you must add “nis” to the lookup order line in your /etc/host.conf file, or you can configure it with linuxconf, as shown in Figure 7-20.

Figure 7-20: Configuring NIS with linuxconf

Chapter 7 Configuring Networking 239

Use the following checklist to test NIS connectivity:

1.Start up /usr/sbin/portmap.

2.Start up /usr/sbin/ypbind.

3.Use the command rpcinfo -p localhost to check if ypbind is registered with the portmapper.

4.Run rpcinfo -u localhost ypbind.

5.The command ypcat passwd.byname provides you with the entire NIS password database.

NFS client configuration

To verify that NFS client software can run with the /proc filesystems, check the /proc/filesystems file and make sure that there is a line containing nfs. If not, you will need to build or download a kernel with built-in NFS support.

See Chapter 5 for more information on upgrading Linux kernels.

After you have verified that NFS client software can run with the /proc filesystems, you can begin using your machine as an NFS client by running the portmapper on that client machine. The program is normally located in /usr/sbin/portmap and only needs to be activated in the /sbin/init.d/ or /etc/rc.d/ files, which are used to start up the portmapper daemon. After you

have completed this, if you plan to use NFS file locking, then both the client and the server need to be running rpc.lockd and rpc.statd, which are usually configured to run by default. If not, refer to the nfs-utilities package supported by the Linux distribution. This task completes the configuration and allows you to create an NFS mount by using the following command:

mount server.nfs.com:/home /mnt/home

This command mounts the server directory /home as a local directory /mnt/home on the client. You can disconnect by using the following command:

umount /mnt/home

Similar to mounting local and remote drives, to create NFS mounts at boot time, simply add the command to mount the drive to the fstab file. You can then expand on this to provide reliability.

Соседние файлы в предмете Операционные системы