Cara install node-red di ubuntu 18.04


Dibawah ini adalah catatan mengenai cara install node-red di ubuntu, pertama tama sebelum kita menginstall node-red maka kita harus menginstall nodejs terlebih dahulu dengan cara

sudo apt update && upgrade -y

curl -sL https://deb.nodesource.com/setup_12.x -o nodesource_setup.sh

sudo bash nodesource_setup.sh

sudo apt install -y nodejs

#setelah itu lanjut mengintall node-red

sudo npm install -g --unsafe-perm node-red node-red-admin

# done node-red sudah jalan untuk test node-red jalankan perintah dibawah ini

node-red

Nah apabila kalian ingin dijadikan service biar bisa njalanin otomatis pada saat start copy script ini di

sudo nano /etc/systemd/system/node-red.service
[Unit]
Description=Node-RED
After=syslog.target network.target

[Service]
ExecStart=/usr/bin/node-red --max-old-space-size=128 -v
Restart=on-failure
KillSignal=SIGINT

# log output to syslog as 'node-red'
SyslogIdentifier=node-red
StandardOutput=syslog

# non-root user to run as
WorkingDirectory=/home/namauser/
User=namauser
Group=namauser

[Install]
WantedBy=multi-user.target

Lalu jalankan perintah ini maka node-red akan jalan setiap mesin start

sudo systemctl enable node-red.service

Ditunggu komennya ...

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.