Mount realize sharing between two linux servers

Example environment:

1, Linux version:

rhel-server-6.8-x86_64

2, Software Version:

nfs4-acl-tools-0.3.3-8.el6.x86_64
nfs-utils-lib-1.1.5-11.el6.x86_64
nfs-utlis-1.2.3-70.el6.x86_64

First, the server (192.168.122.3) (shared source)

  1. Setting allows to mount the directory
    to modify / etc / exports, increase shared directory (shared directory need custom created):
    vi /etc/exports
    
    The following information is copied and stored.
    /home/share 192.168.122.*(rw,sync,no_root_squash)
    
    As shown below:
    image

Wherein:
/ Home / Share is simply more shared directory; exemplary shared directory is / Home / Share
. 192.168.122 * IP client (IP access is permitted, can be directly expressed without limitation IP)
(RW) read and write permissions

  1. Nfs restart service: execution
    service nfs restart
    

Second, the client (192.168.122.2):

  1. Nfs restart service: service nfs restart execution
  2. Mount execution
    mount 192.168.122.3:/home/share  /home/share
    
    Which 192.168.122.3 is the IP of the server
    192.168.122.3:/home/share server shared directory
    / home / local directory share client (the directory can be custom-created)
  3. Unmounted:
    umount  /home/share   客户端目录
    
  4. Mount View
    mount
    
    image

Third, verify

1, the client (example: 192.168.122.2) created / home / share path test files on the server side (example: 192.168.122.3) to see if automatic synchronization;
2, on the server side (example: 192.168.122.3) create the test files in the / home / share path, the client (example: 192.168.122.2) in / home / share to see if auto-sync

Guess you like

Origin www.cnblogs.com/szz1113/p/11769926.html
Recommended