11月に RPi 3の環境を組み直した。
記事にしてなかったので遅ればせながら書き残す。
Raspberry Pi OSのバージョンも 12 にした。使ったのは Lite版。
これを書いている段階で、12月版イメージになったので
解決されているだろうが、10月に出た Lite版だと apt 使用時にエラーが出た。
動かないわけでは無かったみたいだが、鍵周りの設定不足があったらしい。
フォーラムだったかにあった、特定のコマンドを実行で解決出来た。
今回は、主にネットワーク設定の話で nmcli のコマンドのメモ。
おそらく Network Manager Command Line Interface の略だろう。
オプションは、省略が使える。
nmcli 設定の前に幾つかのサービスを調整。
systemctl enable ssh
systemctl start ssh
systemctl disable wpa_supplicant
systemctl disable bluetooth
systemctl disable hciuart
systemctl disable apt-daily.timer
systemctl disable apt-daily.service
systemctl disable apt-daily-upgrade.timer
systemctl disable apt-daily-upgrade.service
ここからが本題で有線接続に IPアドレスを固定する。
nmcli c
で有線デバイスの UUID を確認し、次で使う。
c は、connection の略。
nmcli c m <デバイスUUID> ipv4.ignore-auto-dns yes
nmcli c m <デバイスUUID> ipv4.method manual ipv4.addresses <固定IP>/24
nmcli c m <デバイスUUID> ipv4.gateway <ルーターIP>
nmcli c m <デバイスUUID> ipv4.dns <ルーターIP>
で各種項目を設定。
m は、modify の略。
とりあえずこれくらいだろうか、これで現状動いている。
記事にしてなかったので遅ればせながら書き残す。
Raspberry Pi OSのバージョンも 12 にした。使ったのは Lite版。
これを書いている段階で、12月版イメージになったので
解決されているだろうが、10月に出た Lite版だと apt 使用時にエラーが出た。
動かないわけでは無かったみたいだが、鍵周りの設定不足があったらしい。
フォーラムだったかにあった、特定のコマンドを実行で解決出来た。
今回は、主にネットワーク設定の話で nmcli のコマンドのメモ。
おそらく Network Manager Command Line Interface の略だろう。
オプションは、省略が使える。
nmcli 設定の前に幾つかのサービスを調整。
systemctl enable ssh
systemctl start ssh
systemctl disable wpa_supplicant
systemctl disable bluetooth
systemctl disable hciuart
systemctl disable apt-daily.timer
systemctl disable apt-daily.service
systemctl disable apt-daily-upgrade.timer
systemctl disable apt-daily-upgrade.service
ここからが本題で有線接続に IPアドレスを固定する。
nmcli c
で有線デバイスの UUID を確認し、次で使う。
c は、connection の略。
nmcli c m <デバイスUUID> ipv4.ignore-auto-dns yes
nmcli c m <デバイスUUID> ipv4.method manual ipv4.addresses <固定IP>/24
nmcli c m <デバイスUUID> ipv4.gateway <ルーターIP>
nmcli c m <デバイスUUID> ipv4.dns <ルーターIP>
で各種項目を設定。
m は、modify の略。
とりあえずこれくらいだろうか、これで現状動いている。