yum -y install nfs-utils
yum -y install rpcbind
查看服务端已共享的目录:
[root@localhost ~]# showmount -e 192.168.7.13
Export list for 192.168.7.13:
/data/share 192.168.0.0/16
建立挂载目录,执行挂载命令:
mkdir -p /nfs_file
mount -t nfs 192.168.7.13:/data/share /nfs_file/ -o nolock,nfsvers=3,vers=3
[root@localhost ~]# vim /etc/rc.d/rc.local
#在文件最后添加一行:
mount -t nfs 192.168.7.13:/data/share /nfs_file/ -o nolock,nfsvers=3,vers=3
[root@10-52-134-202 nfs_file]# df -h
192.168.7.13:/data/share 2.0T 525G 1.5T 27% /nfs_file (生效)