NFS設定
NFSサーバの設定備忘録
■サービスの確認
rpcinfo -p xxx.xxx.xxx.xxx
起動していない場合は、
service nfs start
service portmap start
■エクスポートディレクトリの定義
/etc/exportsサンプル
/share 172.27.146.0/255.255.255.0(rw,sync)
/ master(rw) trusty(rw,no_root_squash)
/projects proj*.local.domain(rw)
/usr *.local.domain(ro) @trusted(rw)
/pub (ro,insecure,all_squash)
編集後は、以下のコマンドを実行
exportfs -r
exportfs -v または showmount -e xxx.xxx.xxx.xxxで設定確認。
クライアント
マウントコマンドでマウント、もしくはfstab編集。
mount xxx.xxx.xxx.xxx:/pub /mnt/pub