2024年11月21日星期四 下午7:30:12

2023.10.19,Install Node-RED 3.1 on debian 12 on rpi p3b+ about us

1 年 前
#22547 引用
1

Installing with npm
Installing with docker
Installing with snap

source:https://nodered.org/docs/getting-started/local
https://github.com/node-red/node-red-docker


安装node-red步骤


apt install nodejs
apt install npm
npm install -g --unsafe-perm node-red

https://www.zhetengguai.com/2022/03/10/nodered-environment/
0
1 年 前
#22548 引用



updated:2023.1·0.19

安装环境

每个人的安装环境可能不一样,这里是在debian 12下面的安装。

debian 12 on rpi p3b+

安装方式:Node-RED install scripts
0
1 年 前
#22549 引用
step 1:Install  Node-RED

Linux Installers for Node-RED

https://github.com/node-red/linux-installers#linux-installers-for-node-red




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




output





Running Node-RED install for user root at /root on raspbian


This can take 20-30 minutes on the slower Pi versions - please wait.

  Stop Node-RED                       ✔
  Remove old version of Node-RED      ✔
  Node option not specified           :   --node16, --node18 or --node20
  Leave existing Node.js              :   v18.13.0   Npm 9.2.0
  Clean npm cache                     -
  Install Node-RED core              
  Move global nodes to local          
  Npm rebuild existing nodes          
  Install extra Pi nodes              
  Add shortcut commands              
  Update systemd script              
                                      

Any errors will be logged to   /var/log/nodered-install.log








All done.
You can now start Node-RED with the command  node-red-start
  or using the icon under   Menu / Programming / Node-RED
Then point your browser to localhost:1880 or http://{your_pi_ip-address}:1880

Started :  2023年 10月 19日 星期四 01:45:03 CST
Finished:  2023年 10月 19日 星期四 01:54:09 CST

**********************************************************************************
### WARNING ###
DO NOT EXPOSE NODE-RED TO THE OPEN INTERNET WITHOUT SECURING IT FIRST

Even if your Node-RED doesn't have anything valuable, (automated) attacks will
happen and could provide a foothold in your local network

Follow the guide at https://nodered.org/docs/user-guide/runtime/securing-node-red
to setup security.

### ADDITIONAL RECOMMENDATIONS ###
  - Remove the /etc/sudoers.d/010_pi-nopasswd file to require entering your password
    when performing any sudo/root commands:

      sudo rm -f /etc/sudoers.d/010_pi-nopasswd

  - Do not run Node-RED as root or an administraive account

**********************************************************************************

root@raspberrypi:~#


0
1 年 前
#22550 引用
step 2:Running Node-RED

Once installed as a global module you can use the node-red command to start Node-RED in your terminal.

Node-RED是以全局npm软件包方式进行安装的,那么就直接执行命令node-red



root@raspberrypi:~# node-red
19 Oct 02:03:11 - [info]

Welcome to Node-RED
===================

19 Oct 02:03:11 - [info] Node-RED version: v3.1.0
19 Oct 02:03:11 - [info] Node.js  version: v18.13.0
19 Oct 02:03:11 - [info] Linux 6.1.53-v7+ arm LE
19 Oct 02:03:19 - [info] Loading palette nodes
19 Oct 02:03:27 - [warn] rpi-gpio : Raspberry Pi specific node set inactive
19 Oct 02:03:30 - [info] Settings file  : /root/.node-red/settings.js
19 Oct 02:03:30 - [info] Context store  : 'default' [module=memory]
19 Oct 02:03:30 - [info] User directory : /root/.node-red
19 Oct 02:03:30 - [warn] Projects disabled : editorTheme.projects.enabled=false
19 Oct 02:03:30 - [warn] Flows file name not set. Generating name using hostname.
19 Oct 02:03:30 - [info] Flows file     : /root/.node-red/flows_raspberrypi.json
19 Oct 02:03:30 - [info] Creating new flow file
19 Oct 02:03:30 - [warn]

---------------------------------------------------------------------
Your flow credentials file is encrypted using a system-generated key.

If the system-generated key is lost for any reason, your credentials
file will not be recoverable, you will have to delete it and re-enter
your credentials.

You should set your own key using the 'credentialSecret' option in
your settings file. Node-RED will then re-encrypt your credentials
file using your chosen key the next time you deploy a change.
---------------------------------------------------------------------

19 Oct 02:03:30 - [warn] Encrypted credentials not found
19 Oct 02:03:30 - [info] Starting flows
19 Oct 02:03:30 - [info] Started flows
19 Oct 02:03:30 - [info] Server now running at http://127.0.0.1:1880/


0
1 年 前
#22551 引用
step 3:验证是否安装成功

Node-RED默认端口号是1880 。

在浏览器中输入http://ip:1880可以打开。

可以在http://localhost:1880上看到Node-RED编辑器了。

http://192.168.2.50:1880/
0