rokkonet

PC・Androidソフトウェア・アプリの開発・使い方に関するメモ

nfsサーバーインストール

2021 May 02.
2021 Apr. 30.
2021 Mar. 28.
2021 Jan. 09.
2020 Oct. 31.
2018 Sep. 02.
 
パッケージインストール
Ubuntu
# apt update && apt install nfs-kernel-server
 
(Arch系Manjaro Linux
nfs-utilsパッケージ


/etc/exports 編集
/DIR YOUR.NETWORK.ADDRESS.0/24(rw,sync,no_root_squash,no_subtree_check)
 (例)/DIR 192.168.1.0/24(rw,sync,no_root_squash,no_subtree_check)
 
   # ボリューム毎に記述する。
 /dev/HDD-PARTITON1、 /dev/HDD-PARTITION2の時、
 /dev 192.168.1.0/24(rw,sync,no_root_squash,no_subtree_check) ではなく、
 /dev/HDD-PARTITON1 192.168.1.0/24(rw,sync,no_root_squash,no_subtree_check)
 /dev/HDD-PARTITON2 192.168.1.0/24(rw,sync,no_root_squash,no_subtree_check)
 
  
(以下の/etc/hosts.allowの編集は不要)
/etc/hosts.allow 編集
rpcbind: 192.168.1.0/24
 
 
 
111/TCP 2049/TCP 20048/TCPを開放する。
# ufw enable
# ufw allow proto tcp from YOUR.NETWORK.ADDRESS.0/24 to any port 111
(例)# ufw allow proto tcp from 192.168.1.0/24 to any port 111
# ufw allow proto tcp from YOUR.NETWORK.ADDRESS.0/24 to any port 2049
# ufw allow proto tcp from YOUR.NETWORK.ADDRESS.0/24 to any port 20048
# ufw reload

 
/etc/exports変更の反映
  # exportfs -arv
(PCを再起動するのが確実)