首先配置两个干净的虚拟机
输入命令代码
虚拟机1
9 iptables -F
10 iptables -X
11 setenforce 0
12 yum install nfs-utils
13 showmount -e 192.168.1.168
14 df -Th
15 mount -t nfs 192.168.1.168:/mnt/share /mnt/
16 mount -t nfs 192.168.1.168:/mnt/share /mnt
17 mount -t nfs 192.168.1.168:/mnt/share
18 mkdir /mnt/shareing
19 mount -t nfs 192.168.1.168:/mnt/share /mnt/shareing/
20 mount
21 df -Th
22 cd /mnt/shareing/
23 ls
24 ll
25 cd ..
26 ll
27 cd shareing/
28 mkdir sss
29 ll
30 ls
31 cd ..
32 cd
33 umount /mnt/shareing/
34 ls /mnt/
35 ls
36 ll /mnt/
37 cp Discuz_X3.1_SC_UTF8.zip /mnt/shareing/
38 ls
39 ls /mnt/shareing/
虚拟机2

iptables –F
iptables -X
setenforce 0
yum install nfs-untils
yum list | grep nfs
man showmount
showmount -e 192.168.1.168
df -Th
showmount -e 192.168.1.168
mkdir /mnt/shareing
mount -t nfs 192.168.1.168:/mnt/share /mnt/shareing/
showmount -e 192.168.1.168
ls /mnt/share/

结果截图
NFS应用场景及环境搭建_第1张图片
NFS应用场景及环境搭建_第2张图片
结束