树莓派3b+安装 Node-Red

官网安装说明:https://nodered.org/docs/getting-started/raspberrypi

建议:树莓派系统安装完后直接安装Node-Red,不要在fish下安装,必须退出fish

安装时会一并安装nodejs.

如果还想安装EMQ,需要先安装EMQ,然后再安装Node-Red。

安装EMQ请参照https://blog.csdn.net/armcsdn/article/details/104191797

本文安装环境是在树莓派2019-09-26-raspbian-buster-lite版本下完成的。(后来发现该版本在局域网环境下影响其它设备访问外网)

后改装2018-11-13-raspbian-stretch-lite 版本

提炼一下:

第一步

bash <(curl -sL https://raw.githubusercontent.com/node-red/linux-installers/master/deb/update-nodejs-and-nodered)

第二步 

sudo apt-get install build-essential

第三步 

apt-get install nodered

安装完成,启动:

node-red-start

停止

node-red-stop

重启

node-red-restart

查看日志

node-red-log

本地打开(针对在同一台电脑上安装的)

http://localhost:1880

我自己的 局域网环境

172.16.0.12:1880

安装node-red-dashboard

2018-11-13-raspbian-stretch-lite 下node-red安装完并不会自动安装npm

如果树莓派没有安装npm,需要安装npm

apt-get install npm

 上述安装命令一般安装的版本比较低,可用下述命令升级到最新npm版本

npm install -g npm

正常安装完node-red后的node版本和npm版本

先停止node-red

node-red-stop

依次执行如下命令:

cd ~/.node-red
npm install node-red-dashboard

然后重启

sudo reboot
node-red-start

 本地浏览器打开

http://localhost:1880

我自己的是:172.16.0.12:1880

可以看到dashboard出现在左边侧栏

发布了30 篇原创文章 · 获赞 11 · 访问量 1万+

猜你喜欢

转载自blog.csdn.net/armcsdn/article/details/104188609