Centos環境でnfsサーバーをインストール、設定する方法

1.サーバー側の設定
yum install nfs*
vim /etc/exports
/www/attachment 192.168.0.227(rw,sync,no_root_sqush)
起動
service rpcbind start
service nfs start

2.クライアント側の設定
yum install nfs*
mount -t nfs 192.168.0.230:/www/attachment /www/attachment
起動
service rpcbind start

3.一般的なエラー
3.1 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
3.2 mount.nfs: access denied by server while mounting
修正:
/etc/exports
/www/attachment 192.168.0.227(insecure,rw,sync,no_root_sqush)

Linux

Posted by arkgame