NFS Network File system: Allows different hosts to share files over the network
Need to install Nfs-util package
Configuration steps:
1, in the server-side configuration/etc/exports file that the configuration file has to provide external sharing files and directories information
Edit the/etc/exports syntax as follows:
/SLB 192.168.18.95/24 (rw)
Share/SLB This directory and all contents of the directory to the client with IP address 19.168.18.95,/24 for the subnet mask (255.255.255.0), (RW) to read and write the client's permission to change the shared directory
/tmp 192.168.18.0/24 (RO)
Share all content in the/tmp directory with the directory as a client with IP address 192.168.18.1-192.168.18.254 (i.e. all clients in the/24 network segment)
2. End multiplicity The NFS service on the server
Service NFS Restart
3, the client side detection server has no sharing success
SHOWMOUNT-E 192.168.18.95
Note: If the share is not successful, the server may have a firewall set up.
command to turn off the firewall: service iptables stop
4, if the server shared directory is detected on the client, directly attach the server shared directory to any directory of the client to use the sharing directory
Mount 192.168.180.96:/slb/media
Attention:
A. Server-shared directory on the server to be real, if only in/etc/exports to write a new directory, the client detection can also detect the sharing success, but when the mount will be error.
B. Even if the permissions on the shared directory are changed to readable and writable on the server side, but the permissions of the shared directory are set to read-only in/etc/exports, the client side can only read and write to the shared file.
"Linux" Network File system NFS