https://blog.youkuaiyun.com/yujin2010good/article/details/7672698 原理
rpm -qa|grep nfs
yum install nfs*
vi /etc/exports
/data 10.101.200.7(rw,sync)
在NFS服务器上修改/etc/sysconfig/nfs文件,将#RPCNFSDARGS="-N 4"的#号去掉即可
#启动服务
service nfs start
service rpcbind start
#加入启动服务列表
chkconfig --add rpcbind
chkconfig rpcbind on
chkconfig --add nfs
chkconfig nfs on
#检查
chkconfig --list |grep -E ‘nfs|rpcbind‘
[root@ip-10-101-200-10 ~]# showmount -e localhost
Export list for localhost
/data 10.101.200.7
==================================================
客户端测试
yum install showmount
service rpcbind start
[root@ip-10-101-200-7 ~]# showmount -e 10.101.200.10
Export list for 10.101.200.10:
/data 10.101.200.7
[root@ip-10-101-200-7 ~]# mount -t nfs 10.101.200.10:/data /tmp/data
[root@ip-10-101-200-7 ~]# df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/mapper/vg_testwm1-lv_root
38186488 20007708 16233304 56% /
tmpfs 4030368 0 4030368 0% /dev/shm
/dev/sda1 487652 38405 423647 9% /boot
10.101.200.10:/data 78810112 3481088 71320576 5% /tmp/data