New on LowEndTalk? Please Register and read our Community Rules.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
Best way to install nodejs ?
Hello,
I am currently working on a project and I need nodejs installed on the users' server.
What is the best way to have nodejs installed?
- Let the user install nodejs himself (may not be beginner friendly)
- Script to add official repositories of the distribution and install package (updates are handled by the package manager but with a few versions delay and may not be available for all distributions)
- Script to download nodejs, build and install (last version of nodejs on install but will not update by itself)
- Something else ?
Thanks,
Ed
What is the best way to have nodejs installed?
- What is the best way to have nodejs installed?18 votes
- Let the user install nodejs himself33.33%
- Script to add official repositories of the distribution and install package27.78%
- Script to download nodejs, build and install33.33%
- Something else  5.56%
Comments
What distributions are behind if you take from the official NodeJs repositories? Anyway, NodeJs has a great writeup on the package managers: https://github.com/joyent/node/wiki/Installing-Node.js-via-package-manager
They are not exactly official as they are maintained by third parties. I am unsure if it is acceptable for users to have a whole third party repository added for only a single software but if it is that would save me a lot of headache.
What do most people think about those repos ?
You can build it for the first time and then just update it via npm.
It's pretty neat, I did not know that npm could update nodejs by itself. However it does not ensure that nodejs is kept up to date as the user has to proactively check for updates.
yum install nodejs - easiest way
Build & compile - best way
Really depends on the OS.
Most OS's its as simple as others say, but some others have 'issues' which have to be fixed, e.g. Ubuntu gets into a rights issue with a directory if you don't use sudo correctly. Node is easily the easiest none compiled language to get operating on a server though so just decide on a choice that offers the most benefit to you / your clients.
Ubu/debian/RHEL Repos are from https://nodesource.com/ which is a large company that provides nodejs training for large companies. Pretty sure they are trustable
This: https://github.com/creationix/nvm
I am trusting them, however do most users trust them ? Will they be confortable with having this repo on their servers. That's the question.
While this package is nice to keep multiple versions of nodejs, I do not really see how it can help me solve the initial question since it is using npm which means we need it in the first place.
It installs npm too.
https://github.com/creationix/nvm/blob/master/nvm.sh : line 1012