Node-RED: Difference between revisions

From Q
Jump to navigation Jump to search
Tgurr (talk | contribs)
Created page with "# useradd -m -s /bin/bash nodered # su -l nodered /usr/x86_64-pc-linux-gnu/lib/systemd/system/nodered.service <pre> [Unit] Description=Node-RED flow-based programming for th..."
 
Tgurr (talk | contribs)
No edit summary
 
(12 intermediate revisions by the same user not shown)
Line 1: Line 1:
# useradd -m -s /bin/bash nodered
{{Root|cave resolve node -x}}


# su -l nodered
{{Root|useradd -m -s /bin/bash nodered}}


/usr/x86_64-pc-linux-gnu/lib/systemd/system/nodered.service
{{File|/usr/x86_64-pc-linux-gnu/lib/systemd/system/nodered.service|
<pre>
<pre>
[Unit]
[Unit]
Line 16: Line 16:
WorkingDirectory=/home/nodered
WorkingDirectory=/home/nodered
Environment="NODE_OPTIONS=--max_old_space_size=256"
Environment="NODE_OPTIONS=--max_old_space_size=256"
# uncomment and edit next line if you need an http proxy
# uncomment and edit next line if a proxy is required
#Environment="HTTP_PROXY=my.httpproxy.server.address"
#Environment="http_proxy=http://proxy.domain.local:3128"
#Environment="https_proxy=http://proxy.domain.local:3128"
# uncomment the next line for a more verbose log output
# uncomment the next line for a more verbose log output
#Environment="NODE_RED_OPTIONS=-v"
#Environment="NODE_RED_OPTIONS=-v"
ExecStart=/usr/host/bin/node $NODE_OPTIONS red.js $NODE_RED_OPTIONS
ExecStart=/usr/host/bin/node $NODE_OPTIONS /home/nodered/node_modules/node-red/red.js $NODE_RED_OPTIONS
KillSignal=SIGINT
KillSignal=SIGINT
Restart=on-failure
Restart=on-failure
Line 28: Line 29:
WantedBy=multi-user.target
WantedBy=multi-user.target
</pre>
</pre>
}}
{{Root|systemctl daemon-reload}}
{{Root|systemctl enable nodered}}
== Install ==
{{Root|su -l nodered}}
{{Command|npm init --yes}}
{{Command|npm config set proxy http://proxy.domain.local:3128}}
{{Command|npm config set https-proxy http://proxy.domain.local:3128}}
{{Command|npm install node-red}}
{{Command|npm install node-red-contrib-loxone}}
{{Command|npm install node-red-contrib-alexa-local}}
{{Command|npm install node-red-contrib-bigtimer}}
{{Command|npm install node-red-dashboard}}
== Upgrade ==
{{Root|su -l nodered}}
{{Command|npm outdated}}
{{Command|npm update}}

Latest revision as of 11:52, 14 August 2018

# cave resolve node -x
# useradd -m -s /bin/bash nodered
File: /usr/x86_64-pc-linux-gnu/lib/systemd/system/nodered.service
[Unit]
Description=Node-RED flow-based programming for the Internet of Things
After=syslog.target network.target
Documentation=https://nodered.org/docs

[Service]
Type=simple
User=nodered
Group=nodered
WorkingDirectory=/home/nodered
Environment="NODE_OPTIONS=--max_old_space_size=256"
# uncomment and edit next line if a proxy is required
#Environment="http_proxy=http://proxy.domain.local:3128"
#Environment="https_proxy=http://proxy.domain.local:3128"
# uncomment the next line for a more verbose log output
#Environment="NODE_RED_OPTIONS=-v"
ExecStart=/usr/host/bin/node $NODE_OPTIONS /home/nodered/node_modules/node-red/red.js $NODE_RED_OPTIONS
KillSignal=SIGINT
Restart=on-failure
SyslogIdentifier=Node-RED

[Install]
WantedBy=multi-user.target
# systemctl daemon-reload
# systemctl enable nodered

Install

# su -l nodered
$ npm init --yes
$ npm config set proxy http://proxy.domain.local:3128
$ npm config set https-proxy http://proxy.domain.local:3128
$ npm install node-red
$ npm install node-red-contrib-loxone
$ npm install node-red-contrib-alexa-local
$ npm install node-red-contrib-bigtimer
$ npm install node-red-dashboard

Upgrade

# su -l nodered
$ npm outdated
$ npm update