3
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

ubuntu 16.04 or raspberry pi 3 でのNFSの設定

3
Posted at

はじめに

以下の説明は、IPアドレス 192.168.1.1 のサーバーと IPアドレス 192.168.1.2 のクライアントでNFS共有をする時の設定を意図しています。

サーバー側

まず、サーバーをインストールします。
sudo apt-get install nfs-common nfs-kernel-server
次に、/etc/exportsを編集します。
/home 以下を共有することを想定しています。
sudo vi /etc/exports
中身に以下の行を追加します。
/home 192.168.1.0/255.255.255.0(rw,async,no_roo_squash,no_subtree_check)
サービスを起動します。
sudo service rpcbind start sudo service nfs-kernel-server start
ubuntuでも、raspberry piでもrpcbindがデフォルトでは動いていないみたいです。そのため、最初にrpcbind を起動しています。
その後、nfsサーバーを起動しています。

クライアント側

まず、クライアントをインストールします。
sudo apt-get install nfs-common
次に、/etc/fstabを編集します。
sudo vi /etc/fstab
また中身に以下を追加します。
192.168.1.1:/home /home nfs defaults,soft,intr,clientaddr=192.168.1.2
以下のコマンドで確認してください。
sudo service rpcbind start sudo mount -a
ubuntuでも、raspberry piでもrpcbindがデフォルトでは動いていないみたいです。そのため、最初にrpcbind を起動しています。

参考

http://askubuntu.com/questions/771319/in-ubuntu-16-04-not-start-rpcbind-on-boot
http://qiita.com/hdoi/items/9cff4f840939636df807

3
4
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?