File sharing between multiple Linux

Environment is CentOS7.

Using NFS implementation.

The first step: server installation and start nfs and rpcbind

Check if installed

It represents nfs already installed

 It represents rpcbind already installed.

If the installation is not detected

Check whether to activate:

 He said that it has started, if not start the

start up.

Part II: Client installation and start nfs and rpcbind

Step above:

Part III: Configuring nfs server configuration file

1. vi /etc/exports

As content is added:

/ Home / zhutong / server / evaluation 10.106.10.138 (rw, sync, no_root_squash) represents the share path client privilege address.

2. exportfs -r the configuration file to take effect

Permission Description:

  • rw: read-write shared directory
  • all_squash: All Access users are mapped to anonymous user or user group
  • no_all_squash (default): accessing user and the machine user, the matching fails mapped to anonymous users or user groups
  • root_squash (default): The visiting root user mapped to an anonymous user or user group
  • no_root_squash: visiting the root user to keep root privileges
  • anonuid: the development of anonymous access to the user's local shadow tiger UID defaults to nfsnobody 65534
  • anongid: Specifies the anonymous access user's local user group GID defaults nfsnobody 65534
  • secure (default) to limit the client only from less than 1024 tpc / ip port server
  • insecure: allow the client from tcp / ip is larger than the server port 1024
  • sync: synchronize data written to disk and memory buffer, the low efficiency, but can ensure data consistency
  • async: the first data stored in the memory buffer is written to disk only when necessary
  • wdelay: Check for related write operation, if the write operation is performed together, improve efficiency
  • no_wdelay: If a write operation is performed immediately, should be used in conjunction with sync

Brother four: Client Operating test

1. Make sure the client is installed and start the nfs and rpcbind complete. And server-side validation consistent.

2. Create the mount directory

3. Test mount directory, there is demonstrated by the following (usually mounted between the internal network, consider firewall issues)

4. Mount

Other commands

umount / home # unload mount directory

 

Guess you like

Origin www.cnblogs.com/woxbwo/p/11581826.html
Recommended