NFS服务端
1.打印系统版本
[root@nfsserver ~]#cat /etc/redhat-release
[root@nfsserver ~]#uname -r
2.检查并安装NFS服务
[root@nfsserver ~]# rpm -qa rpcbind portmap nfs
[root@nfsserver ~]#yum groupinstall "NFS file server"或者yum install -y nfs-utils rpcbind
3.启动RPC及NFS服务并检查
[root@nfsserver ~]#/etc/init.d/rpcbind start
[root@nfsserver ~]# ps -ef |grep rpc
[root@nfsserver ~]#/etc/init.d/rpcbind status
[root@nfsserver ~]#rpcinfo -p localhost
4.设置开机自动启动并检查
[root@nfsserver ~]# chkconfig nfs on
[root@nfsserver ~]# chkconfig rpcbind on
5.配置共享data目录
[root@nfsserver ~]# vim /etc/exports
##########shared data for bbs by andy at 20160825
/data 192.168.100.0/24(rw,sync)
6.创建共享目录
[root@nfsserver ~]# mkdir /data
7.平滑加载NFS服务并检查服务
[root@nfsserver ~]#/etc/init.d/nfs reload
[root@nfsserver ~]#showmount -e localhost
NFS客户端
1.检查系统版本
[root@nfsclient ~]# cat /etc/redhat-release
CentOS release 6.5 (Final)
[root@nfsclient ~]# uname -r
2.6.32-431.el6.x86_64
2.安装rpc服务并检查
[root@nfsclient ~]# yum groupinstall "NFS file server"
3.启动rpc服务并检查
[root@nfsclient ~]#/etc/init.d/rpcbind start
4.设置开机自动启动并检查
[root@nfsclient ~]#chkconfig rpcbind on
5.检查服务端NFS是否OK
[root@nfsclient ~]#showmount -e 服务的ip地址
6.挂载并测试
[root@nfsclient ~]#mount -t nfs 192.168.100.100:/data /mnt/
原文地址:http://yinqiang1119.blog.51cto.com/10869441/1843135