服務端:vim
yum install nfs* spa
vim /etc/exportscode
/www/attachment 192.168.0.227(rw,sync,no_root_sqush)server
啓動服務ci
service rpcbind start
rpc
service nfs start
io
客戶端file
1. yum install nfs*
service
mount -t nfs 192.168.0.230:/www/attachment /www/attachment
im
啓用服務
service rpcbind start
客戶端常見錯誤:
一、客戶端沒有啓用 rpcbind
mount: wrong fs type, bad option, bad superblock on 192.168.0.230:/www/attachment,
missing codepage or helper program, or other error
(for several filesystems (e.g. nfs, cifs) you might
need a /sbin/mount.<type> helper program)
In some cases useful info is found in syslog - try
dmesg | tail or so
二、 mount.nfs: access denied by server while mounting
端口問題(具體疑問Google之)
修正服務端/etc/exports
/www/attachment 192.168.0.227(insecure,rw,sync,no_root_sqush)