服务端


客户端
[root@localhost ~] mkdir /nfs/shared
[root@localhost ~] mount 192.168.150.130:/nfs/shared /nfs/shared
[root@localhost ~] mount 192.168.150.130:/nfs/shared /nfs/shared
[root@localhost ~] ls /nfs/shared

服务端
[root@localhost ~] mkdir /nfs/upload
[root@localhost ~] chmod 777 /nfs
[root@localhost ~] chmod 777 /nfs/upload
[root@localhost ~] vim /etc/exports
-----------------------------------------------------
/nfs/upload 192.168.200.0/24(rw,anonuid=210,anongid=210,all_squash)
-----------------------------------------------------
[root@localhost ~] exportfs -ra
[root@localhost ~] groupadd -g 210 nfs-upload
[root@localhost ~] useradd -u 210 -g nfs-upload nfs-upload
[root@localhost ~] tail -n 1 /etc/passwd
客户端
[root@localhost /] mkdir /nfs/shared
[root@localhost /] mkdir /nfs/upload
[root@localhost ~] mount 192.168.200.128:/nfs/upload /nfs/upload
[root@localhost ~] cd /nfs/upload/
[root@localhost upload] touch abc

服务端
[root@localhost ~] useradd tom
[root@localhost ~] chmod 770 /home/tom
[root@localhost ~] vim /etc/exports
[root@localhost ~] exportfs -ra
[root@localhost ~] cd /home/tom
[root@localhost ~] touch test
客户端
[root@localhost ~] useradd tom
[root@localhost ~] mkdir /tom
[root@localhost ~] mount 192.168.150.130:/home/tom /tom
测试
