1.NFS Network File System
NFS (Network File System) service can file on a remote Linux system to mount shared resources directory on the local host, so that the local host (Linux clients) based on TCP / IP protocol, as it did read resources on the local host write a shared folder on a remote Linux system.
RHEL 7 system has a default installation of NFS Services
2. Install the NFS Service
# yum install nfs-utils Loaded plugins: langpacks, product-id, subscription-manager (1/2): rhel7/group_gz | 134 kB 00:00 (2/2): rhel7/primary_db | 3.4 MB 00:00Package 1:nfs-utils-1.3.0-0.el7.x86_64 already installed and latest version Nothing to do
3.NFS service configuration
# vim /etc/exports /nfsfile 192.168.1.*(rw,sync,root_squash)
Parameter Description
parameter | effect |
ro | Read-only |
rw | Read and write |
root_squash | When the NFS client access to the root administrator, mapped to the anonymous user NFS server |
no_root_squash | When the NFS client access to the root administrator, mapped to the root administrator of the NFS server |
all_squash | No matter what NFS client account access, are mapped to the NFS server anonymous users |
sync | While writing data to the memory and hard drive to ensure that no data is lost |
async | Priority will save the data to memory, and then written to disk; this higher efficiency, but may lose data |
Use showmount command to query a remote NFS server to share information, the output format as "shared directory name allows the use of client addresses."
# showmount -e 192.168.1.1 Export list for 192.168.1.1: /nfsfile 192.168.1.*
parameter | effect |
-e | Display a list of shared NFS servers |
-a | Display case situation NFS resource file resource native mount |
-v | Displays the version number |