Raspberry Pi設定

Raspberry Pi設定

1.以下のファイルに無線LAN登録
/etc/wpa_supplicant/wpa_supplicant.conf

以下を追加(Wifiルータに合わせてssid,password登録する。)
# ----- start -----
network={
ssid="ssid"
psk="password"
}
# ----- end -----


2.以下のファイルにeth0設定
/etc/network/interfaces

# ----- start -----
# interfaces(5) file used by ifup(8) and ifdown(8)

# Please note that this file is written to be used with dhcpcd
# For static IP, consult /etc/dhcpcd.conf and 'man dhcpcd.conf'

# Include files from /etc/network/interfaces.d:
source-directory /etc/network/interfaces.d

auto lo
iface lo inet loopback

# iface eth0 inet manual

auto eth0
iface eth0 inet dhcp

auto eth0:0
iface eth0:0 inet static
address 192.168.0.0
netmask 255.255.255.0
broadcast 192.168.0.255

allow-hotplug wlan0
iface wlan0 inet manual
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf

allow-hotplug wlan1
iface wlan1 inet manual
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
# ----- end -----

3.以下のコマンド起動時にNode-RED自動開始
sudo systemctl enable nodered.service
上記のコマンド実行してエラー(ファイルまたはDirectoryがない)の場合には以下を実行して再度行う。
----- start -----
参考URL
https://nodered.org/docs/hardware/raspberrypi
コマンド
bash <(curl -sL https://raw.githubusercontent.com/node-red/raspbian-deb-package/master/resources/update-nodejs-and-nodered)
----- end -----