Node.js is already in our local yum repo so that's already handled.
So I'm going to use this command to zip an installed node-red system:
tar -zcvf nodered-lib.tar.gz /usr/lib/node_modules/node-red-admin/ /usr/lib/node_modules/node-red/ /usr/bin/node* /root/.node-red/
There is another folder which I am not including:
/usr/lib/node_modules/npm/
but I assume that's just for NPM. I won't be running NPM because we're not online anyway.
I'm using a systemctl init service file to start the node-red server. This is what my node-red.service file looks like:
[Unit]
Description=Node-Red
After=syslog.target network.target
Documentation=http://nodered.org/
[Service]
Type=simple
User=root
Group=root
WorkingDirectory=/root/.node-red
ExecStart=/usr/bin/node /bin/node-red
Nice=10
SyslogIdentifier=Node-RED
StandardOutput=syslog
Restart=on-failure
KillSignal=SIGINT
[Install]
WantedBy=multi-user.target
Normally when I install node-red components, I'm installing with a -g for global. Is there some magic to the -g configuration or does the fact that these files are located in /usr/lib/node_modules/ mean they are, by default, global? Does this even matter?
I can see folders for various required modules in /root/.node-red/node_modules/ which I installed through the nodes palette.
Thanks for your help, Dave.