[iyunv@sherry nfsshared]# /etc/init.d/nfs restart
Shutting down NFS daemon: [ OK ]
Shutting down NFS mountd: [ OK ]
Shutting down NFS quotas: [ OK ]
Shutting down RPC idmapd: [ OK ]
Starting NFS services: [ OK ]
Starting NFS quotas: [ OK ]
Starting NFS mountd: [ OK ]
Starting NFS daemon: [ OK ]
Starting RPC idmapd: [ OK ]
client:
1
2
3
4
5
6
7
8
9
[iyunv@marvin ~]# yum install nfs-utils rpcbind -y
[iyunv@marvin ~]# rpcinfo -p sherry #nfs客户端执行 需要安装rpcbind
program vers proto port service (每项都多个)
100000 2 udp 111 portmapper
100011 2 tcp 875 rquotad
100005 3 tcp 33671 mountd
100003 2 tcp 2049 nfs
100227 2 tcp 2049 nfs_acl
100021 4 tcp 36734 nlockmgr
1
2
3
[iyunv@marvin ~]# showmount -e sherry #nfs客户端执行 需要安装nfs-utils
Export list for sherry:
/nfsshared 192.168.1.0/24
#client
[iyunv@marvin node1]# touch a
#server
[iyunv@sherry nfsshared]# cd node1/
[iyunv@sherry node1]# ll
total 0
-rw-r--r-- 1 nginx nfsnobody 0 May 26 23:02 a