Article Title: how to install and configure NFS servers in Linux. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.
If the NFS component has been installed by default during Red Hat Enterprise Linux 5 installation, the next step is to configure related files to enable the server to provide the NFS service. The steps are as follows.
(1) set a computer as an NFS server and start the relevant daemon (in "service configuration") in the background ). Generally, if the NFS server is to provide services, the four daemon processes inet, portmap, nfs, and mount must be started and run in the background.
(2) plan server partitions and define which partitions are used as the file system to be shared in terms of security.
(3) define the parameters of each client in the client list.
(4) Modify/etc/exports.
(5) restart the NFS server. You can use the command line method, that is,/etc/rc. d/init. d/nfs restart. There are three ways to share the file system on the server. One is to directly modify the/etc/exports file, the other is to use the exports command to add and delete directories, and the third is the graphical configuration method.
1. Understand the system structure of NFS network files
The system structure of the NFS network file includes the following directory structure:
1./etc/exports
This file is the main configuration file of NFS, but the system does not have the default value, so this file may not exist. You may need to use vi to create this file. The subsequent settings are only this file.
2./usr/sbin/exportfs
This is the command for maintaining NFS shared resources. We can use it to re-share the directory resources changed by/etc/exports and unmount or re-share the directories shared by the NFS Server. This command is an important part of the NFS system. The command usage will be described later in the following section.
3./usr/sbin/showmount
The showmount command is mainly used on the Client side to view the directory resources shared by NFS.
4./var/lib/nfs/* tab
All the logon files on the NFS server are stored in the/var/lib/nfs/directory, which contains two important logon files: etab, the complete permission settings for the directories shared by NFS are recorded. The other is xtab, which records the client data that has been connected to the NFS host.
[1] [2] [3] [4] Next page