Raspberry Pi3 セットアップ& NFSサーバ設定 メモ


Environment

Raspberry Pi 3
NOOBS_V3_2_0

Set up

Choose Raspbian Full install

Setting root password

bash
sudo passwd root
sudo apt update
sudo apt dist-upgrade
sudo apt dist-upgrade --fix-missing

Add user

bash
sudo useradd user
sudo passwd user

sudo mkdit /home/user
sudo chown user:user /home/user

Change autologin-user

/etc/lightdm/lightdm.conf
autologin-user=user
/etc/systemd/system/[email protected]
#ExecStart=-/sbin/agetty --autologin tmp --noclear %I $TERM
ExecStart=-/sbin/agetty --autologin user --noclear %I $TERM

sudo権限付与

usermod -aG sudo user

NFSサーバインストール

sudo apt install nfs-kernel-server
mkdir /home/user/nfs
/etc/export
/home/user/nfs *(ro,sync,no_subtree_check)

IPアドレスの静的設定

/etc/dhcpcd.conf
interface eth0
static ip_address=192.168.1.1/24
static routers=192.168.1.1
static domain_name_servers=

MACからのマウント確認

bash
sudo mount_nfs -o resvport 192.168.1.1:/home/user/nfs ./mnt