please can someone give me a basic guide on the correct way to install node-red
every time i create a new linux box (ubuntu,zorin etc) I then have rights issue get node-red and npm install
from a new installation how should i sign in ? and then what are the correct steps to install?
If you are using Ubuntu the first yellow box in the docs is where you need to start - https://nodered.org/docs/getting-started/local
aka use the Pi/Debian/Ubuntu install script.
Or if you want to tidy up first
sudo apt purge -y nodejs npm
sudo apt update
sudo apt upgrade
then run the script
then i get this!
"user@zorin:~ sudo npm install -g --unsafe-perm node-red
[sudo] password for user:
/usr/bin/env: ‘node’: No such file or directory
are there only certain linux that this works and not all linux work?? its all so confusing!!
zorin is based on ubuntu so you should clean up then try the script. (without sudo)
The script linked to earlier is this one, but it appears you are manually installing it. You can do that if you like but the script is easier.
Just downloaded a zorin iso - booted as a virtual machine - logged in - ran script - installed fine... all good.
zorin 15 LTE i am using is that what you tested?
I just grabbed what was offered - zorin 15.2-Core-64bit I think.
In your screenshot.. Where did nvm come from ? It isn't installed by default.
If you need to set it up manually, check Dave's script for the template or my one here:
sorry i dont know what you mean by manually a scripts you all seem to talk in a different languge
just a simple set of instruction on how to install from start to finish would be so helpfull
I dont get why you seem to need a user name and password (and sometime a different one for sudo)
so just set them all the same
I dont know I will start again and see if I can get zorin 15.2-core-64bit
and just try using the bash thing!!
Garrath (I dont know but windows seem so much more straight forward)
OK, you realise that is what Dave's script is don't you? Why not take a look at it so that you understand what it is doing. It is just issuing the commands in order that you would have to do by hand in a terminal. It also checks things that you would otherwise have to work out for yourself.
You do need some basic skills here if you want to set up a server to run home automation. In this case, some basic administration skills.
On any IT system, it is common to have at least 2 different logins (2 user identities). One for administrative stuff (installing software, rebooting, adding new users, etc) and one for user stuff (that cannot do the admin stuff).
It is much preferred to run software services as a "user" rather than as an "administrator" because that is a lot more secure. So we recommend running Node-RED with user credentials. On a Raspberry Pi with the default OS installed, that is simple because it is designed to be simple. There are 2 users. "pi" and "root". Root is the default admin super-user on Linux. It has special powers and you really don't want to use it unless you have to. So Node-RED is run under the "pi" user typically on a Raspberry Pi.
However, the standard install for Node-RED does require admin access because it is installed for any user to use (a so-called "global" installation). In order to do that, we temporarily give admin rights to the normal user. That uses a special command called
sudo. Confusingly, when using sudo, you give the users password not the root password - that's because you have to give a user permission to use sudo and only root can do that.
Now, if you are not using a Pi or not using the default Rasbian OS (which is based on Debian). You may need to do some more things yourself. Typical Linux installations ask you to set up a standard user account when you install the OS. This becomes the equivalent of the "pi" user. However, it may not have the rights that the pi user gets since most OS installations prefer security over convenience. So you may need to give your user sudo rights and may need to add it to some additional user groups so that it has access to hardware such as USB ports and Bluetooth for example. You will need to read up on the help for your OS to do that.
I've tried to gloss over a load of detail which isn't important to get you going but hopefully that makes more sense as to why there are two different identities and how/when they are used.
Well, mainly it is just different. It also uses similar security concepts but implements them somewhat differently.
yes thanks that is little clearer i'm used to doing everthing as an administrator & dont tend to bother with users so think that is why this seems back to front
not sure I have really found where you hadle the security in linux (every thing i have seen appear to over complicate it)
I'm happy to stick with the raspberry pi way off doing (if only I know how)
can you just confirm that "root" is a user like "administrator" and not the root of the directory structure or are you saying its both
Im go to start again
once I have the os up and running
what automated routine should I run to get node-red working & be able to add the npm moddles in
(now installing zorin core)
just so i am clear
as soon as i have the working os
i run this command
bash <(curl -sL https://raw.githubusercontent.com/node-red/linux-installers/master/deb/update-nodejs-and-nodered)
as the user and not with the sudo
and it should install with no issues?
Yes - it will ask for the admin (sudo) password once while it does the install - it will also install the the service for you (but not enable it).
Once installed if you run
node-red-start once it will start Node-RED so you can test - but also print out the command you need to type to enable the service to start at boot time. Do that and the next time you boot Node-RED should be automatically running.
i dont need to put the sudo infront of the command?