NFS

サーバー

/etc/exportsの設定

/home 192.168.0.0/255.255.255.0(rw)

NFSを起動します。

# exportfs -a
# /etc/rc.d/initd/nfs start

設定の確認は次のようにできます。

# showmount -e localhost
Export list for localhost:
/home 192.168.0.0/255.255.255.0

#ntsysv で起動時に立ち上がるように設定。


Webminでやるともっと簡単でした。
Webmin -> ネットワーク -> NFS エクスポート -> 新規のエクスポートを追加
エクスポートするディレクトリ -> /home
エクスポート先.. -> ネットワーク:192.168.0.0、ネットマスク:255.255.255.0
リモート ユーザを信頼する -> 全員
作成
変更を適用

クライアント

マウント用のディレクトリを作成。

# mkdir /mnt/sunshine

マウント可能かチェック

# showmount -e sunshine
Export list for sunshine:
/home 192.168.0.0/255.255.255.0

マウント

# mount -t nfs sunshine:/home /mnt/sunshine

マウント解除

# umount /mnt/sunshine

起動時にマウントするには /etc/fstab に以下の行を追加。

sunshine:/home /home nfs rw 0 0
Linux Life
Vine Linux > サーバー > 各種設定 > ファイルサーバー > NFS