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)
- Setting allows to mount the directory
to modify / etc / exports, increase shared directory (shared directory need custom created):
The following information is copied and stored.vi /etc/exports
As shown below:/home/share 192.168.122.*(rw,sync,no_root_squash)
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
- Nfs restart service: execution
service nfs restart
Second, the client (192.168.122.2):
- Nfs restart service: service nfs restart execution
- Mount execution
Which 192.168.122.3 is the IP of the servermount 192.168.122.3:/home/share /home/share
192.168.122.3:/home/share server shared directory
/ home / local directory share client (the directory can be custom-created) - Unmounted:
umount /home/share 客户端目录
- Mount View
mount
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