Server for NFS
First, Ann and start NFS
1. Install NFS
Yum-y Install nfs-utils-*_64 nfs4-acl-tools*.64
2. Start NFS
#启动nfs要先启动rpc服务, after 6.0 rpcbind and Rpcidmap are the default RPC services
#如果没有启动rpc则会报错, resulting in a user Rights mapping error
Rpc.nfsd:unable to set any sockets for NFSD
Service Rpcbind Restart
Service NFS Restart
Start on #设置在运行级别2, 3, 4, 5
Chkconfig NFS On
Second, configure NFS
1. Port configuration file/etc/sysconfig/nfs
2. Related Documents and Orders
#维护nfs共享资源
/usr/sbin/exportfs
#记录客户端登录情况
/var/lib/nfs/*tab
#记录nfs共享目录完整权限设定
/var/lib/nfs/etab
#记录曾经连接到nfs服务器的相关客商信息
/var/lib/nfs/xtab
#查询服务器共享资源
/usr/sbin/showmount
3. configuration file/etc/exports
#共享目录主机/single ip/network segment/single domain name/entire domain name in parentheses for permissions or other parameters
/nfs 192.168.137.0/24 (rw) *.samba.local (RO)
4. Example
(1) Start NFS
Server Rpcbind Restart && Server NFS Restart
(2) Display server shared directory
/usr/sbin/showmount e 127.0.0.1
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/6E/0B/wKioL1VyoLOz4CaqAABimcoA6oY790.jpg "/>
Or:
/usr/sbin/exportfs
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/6E/0F/wKiom1VynxSRZWJtAAA99j1SjLE773.jpg "/>
(3) Mount NFS on Windows
Winodws Server 2008/2012 enables NFS clients in a role
Under the command line:
Mount 192.168.137.100:/nfs *
Or:
Mount 192.168.137.100:/nfs y:
* Indicates the next available drive letter, Y: indicates direct mount as Y disk
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/6E/0B/wKioL1VyoLTD12syAABfiTM83SQ281.jpg "/>
Because the 192.168.137.0/24 network segment has only read permissions, the Write file is rejected:
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/6E/0F/wKiom1VynxWjeqCKAAEcQQTPKsY017.jpg "/>
5. Problems encountered
(1) domain name cannot be resolved in/etc/exportx
When you start NFS, you are prompted to refer to DNS to resolve the domain address
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/6E/0B/wKioL1VyoLSwLJsvAAFDKd3pT5U394.jpg "/>
This article is from the "Love On Action" blog, please be sure to keep this source http://1055745601.blog.51cto.com/5003160/1659186
Linux NFS Configuration